Giter Club home page Giter Club logo

partlocater's Introduction

partlocater

Find a part on Digi-Key and import parameters into local database We are now compatible with Digi-Key V3 API We are not associated with Digi-Key in any way other than being a long time customer. Digi-Key has an api-portal for which one of the functions is to provide all the technical parameters for the components they sell. They aggressively keep this accurate and up to date as if their business depends on it. This app will query Digi-Key with a Digi-Key partnumber and downloads the parameters from Digi-Key and puts them into a SQL database. Several eCAD tools can use the information in the database to put the information into the schematic.

This could work for a number of tools such as Orcad and Altium. Since I have Altium, it is the first tool that it works for.

It would be cool if this were made to work on open-source tools. Haven't researched that yet though.

This was written in Python and requires Python 3. It interfaces to a MariaDB SQL database and therefore requires the database and connector to that database. Digi-Key uses a restrictive version of OATH2 for authentication. The bottom line is that you need a call back web server running locally to initially get an authorization token (or if the token is corrupt). The tokens after the initial one are updated by the tool itself and you don't need a web server for that.

Digi-Key has a .net solution if you want a fully windows solution. I've never used it. So for local usage, I recommend XAMPP. XAMPP contains apache, php, cURL and MariaDB and installs on Windows. The reason for this is I wanted to be able to scale it to an intranet server and Apache, MareaDB, PHP, and cURL work on most Linux and Unix OS. So in the doc folder is a description on how to set this up.

This was intended to work for either single engineer or a small group. It can work from a single workstation or to a local server.

v3.0.1

Added a dialog box for table creation. Digikey has been changing the categories which I used for table generation. I've got a means to map them to a smaller set of tables in the assets/map.cfg file under the Library section. I added a dialog box if a table is going to be created that asked if you want to create a new table or abort. Aborting means you can copy the Category property that triggered the alert and paste it into the assets/map.cfg file as =. Restart partlocator and query digikey for the part again. Committing the part shouldn't trigger the alert.

v3.0.0

Updated to be compatible with Digi-Keys V3 API. V2 and V1 have been suspended and will no longer work. Made changes in the treeview user interface where the right hand cells are edittable and no longer require a separate entry box.

v1.0.4-beta

Added a popup database selector if there is more than one database and errors if there are no databases. If there is one database it will automatically open on startup.

v1.1.0

The existing database would fail to load in newer versions of mariadb (10.x). The property tables can have over a hundred columns and for later Mariadb this violated the table size by using varchar types. The solution was to move most types to TEXT. In the assets directory is a simple command line script to change the datatype of an exported .sql database to a newer type. If you are using partlocater for the first time, you do not need to do anything, it will automatically use the right thing.

Digikey is changing their API and the existing one will be going away. I am converting partlocater over to the new system; owever, this will continue to work. Note that the instructions for getting an account in the partlocater documentation will no longer work. The biggest difference is that you use the standard digikey login rather than having to sign up for the API. You go to the developers portal and create an organization and production app to get the client ID and client secret.

v1.5.0

partlocater uses tkinter and the treeview is dated and did not have editable cells. I found an idea on the web to make that work and implemented it for the parameter list on locate on Digikey plus the search view. Made other minor changes to the UI. A new revieion is coming to accomadate the v3 API for Digikey as they are depracating v2. Wanted to get the UI changes out first. This has been tested on Windows 7 and 10.

partlocater's People

Contributors

alkgrove avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

partlocater's Issues

Part search problem

Hi,
It is a great tool. I have no issues installing it on windows 7 machine and some small problems adapting it to a Linux machine.
I tried to insert in the database some of my parts from the last 10 years to see how it works (almost 1000 parts) and I had 2 main problems. One of them is that DK changed some old part numbers and they don't exist anymore or are under different name that are not linked to the old one - nothing can be done about that. The second problem is that the part number exists but it is not properly transferred as request. It is because in your script digikey.py you selected to use html.escape(part_id) but it is not the right one for this purpose. I changed that to:
from urllib.parse import quote
...
url = ... + quote(part_id,safe='');
This will make possible to search for part numbers like 24FC64F-I/P-ND, DS1307+T&RCT-ND, etc.

I also have experimented with adding a function to search for the legacy 1D barcodes. The input from the user is checked first if it looks like 22 digits legacy 1D barcode (like 1642795000000250526056) and it converts it to a Digikey part number before trying to search for product information. This makes the input to the script much easier when you have the parts in anti-static envelopes with barcode labels and by using the barcode reader to enter them in milliseconds to the script. That works just fine but the newer 2D barcodes produce much more data (including the Digikey part number inside) and it needs more time to make it working.

Idea for enhanced search

Let's say hypothetically you wanted the most bang for your buck when shopping for capacitors. You could sort DigiKey parametricly by cost or capacitance, but why not both? Through an text cleaner, parameters could be divided, multiplied, squared, etc. to sort by a complex parameter. I could and want to help with this, but before I start, I want to know if you have any objections or concerns. I'm not sure how network and server intensive this may end up being.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.