Skip to content
This repository has been archived by the owner on Jan 22, 2024. It is now read-only.

octopart/CPL-Data

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 

Repository files navigation

CPL-Data

The Common Parts Library is a set of commonly used electronic components for designing and manufacturing connected device products. This library has CPL for Production and CPL for Prototyping data in YAML format.

For more information about the Common Parts Library, please check this page. For CAD models in various PCB design tools, refer to individual part detail pages on Octopart such as this one.

Sign up for Octopart Slack channel here, and share any questions, feedback or thoughts with us there.

YAML data can be parsed in all the major languages. An example on how to parse the YAML data in Python is shown below. It returns all capacitor MPNs with a value of 1 pF in the CPL for Production:

import yaml
with open('CPL-Data/CPL for Production/Capacitors.yaml', 'r') as f:
    doc = yaml.load(f)

def findmpn(value):
    for row in doc["rows"]:
        if row["extravals"]["Capacitance"] == value:
            for part in row["parts"]:
                print(part["mpn"])


if __name__ == "__main__":
    findmpn("1 pF")