Inventory Management and Data Miner! - Page 1
Forum section: electronics / general

author: empty_space
author_rank: Newbie
timestamp: May 16, 2020, 06:58:08 am
content: So this is something I wished I thought of doing earlier, but didn't think of it until recently. Hopefully, it will give someone else some inspiration.I used to keep track of my inventory in a spreadsheet, but I never really kept track of how much I used. It was more of a purchasing list. I decided to go with a new tool to do that job for me. There are a bunch of options out there that may do a better job. But this method is free and I also decided that if I got a scanner, it would make the check in/out process much easier. So I would be more inclined to keep track.I went with PartKeepr for inventory management. There was a little bit of a learning curve to get used to it and there are a couple issues with it. So I decided to build a tool to help improve my experience with it. The tool was built off of Python and then I wrote a little REST API to interface with the PartKeepr SQL database.Here's the fun part! It's no fun entering all the parts my hand and all the parameters, so I made a little data miner that searches mouser.com for the parts (using their API initially). And then it takes it a step further and parses the loaded web page for the table of parameters that each part has (package, voltage rating, bandwidth, size, etc...) and adds it to the PK database. Turns out mouser.com actively searches for robots, so this became a bit of a challenge to get around. It also downloads the image of the part and adds it to the database as well (semi-automatic for now). The whole process isn't 100 automatic because there's a captcha you need to get by.So all you do is enter the part number (or scan) and the tool will:1. Search the database to see if it exists2. Adds it if it doesn't3. Create an internal part number4. Mine mouser.com for parameters5. Generate a QR code based on the internal part number6. Assigns that QR Code to the part7. Saves the part number to a spreadsheet so I can import it into my label maker to print outAnd with my tool, for each item I scan I can add or subtract inventory without effort. Hopefully this will keep me on track! The scanner I have has a memory mode, so I can do inventory later or right away in instant upload mode.Here's an example video of the scanner with my PK databasehttps://youtu.be/Rx2d9_IW5QUWould like to hear what else you guys do to keep track of inventory so I can get some ideas. This isn't quite ideal, but its a step in the right direction and at least its all free.

author: olkipukki
author_rank: Frequent Contributor
timestamp: May 16, 2020, 11:00:08 am
content: Quote from: empty_space on May 16, 2020, 06:58:08 amWhy are you doing this? Are you search 100 thousands parts per day?https://api.mouser.com/api/docs/ui/indexMouser provides Search REST APIs (that based on their original ones) that straight forward to integrate (do not require any jwt, oauth etc)You just need to fill a form and they usually auto-approve the access

author: empty_space
author_rank: Newbie
timestamp: May 16, 2020, 02:50:25 pm
content: Quote from: olkipukki on May 16, 2020, 11:00:08 amI am using their API for the initial search, but it will only give back basic part information (unless I missed something...).Code:"Availability": "2297 In Stock","DataSheetUrl": "https://www.mouser.com/datasheet/2/302/K02P64M100SFA-1126333.pdf","Description": "ARM Microcontrollers - MCU 64KB Flash 100MHz Entry Level 32QFN","FactoryStock": "0","ImagePath": "https://www.mouser.com/images/freescale/images/QFN_32_t.jpg","Category": "ARM Microcontrollers - MCU","LeadTime": "35 Days","LifecycleStatus": "","Manufacturer": "NXP Semiconductors","ManufacturerPartNumber": "MK02FN64VFM10","Min": "1","Mult": "1","MouserPartNumber": "841-MK02FN64VFM10",For example, their API doesn't give detailed info about the part (see attached).Might be a bit overkill, but it was one of those projects that kind of got carried away.

author: olkipukki
author_rank: Frequent Contributor
timestamp: May 16, 2020, 03:59:15 pm
content: Ah, I see, but be careful - not always correct what you see there

author: mpbrock
author_rank: Contributor
timestamp: May 26, 2020, 04:07:39 pm
content: Octopart integration? Partkeepr does this by default doesn't it...?What are you using as a QR code scanner - that looks interesting - as do the storage boxes... Thanks