Skip to content
master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 

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")