OpenPartsLibrary 0.1.2__py3-none-any.whl → 0.1.4__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- openpartslibrary-0.1.4.dist-info/METADATA +160 -0
- {openpartslibrary-0.1.2.dist-info → openpartslibrary-0.1.4.dist-info}/RECORD +5 -5
- openpartslibrary-0.1.2.dist-info/METADATA +0 -30
- {openpartslibrary-0.1.2.dist-info → openpartslibrary-0.1.4.dist-info}/WHEEL +0 -0
- {openpartslibrary-0.1.2.dist-info → openpartslibrary-0.1.4.dist-info}/licenses/LICENSE +0 -0
- {openpartslibrary-0.1.2.dist-info → openpartslibrary-0.1.4.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,160 @@
|
|
1
|
+
Metadata-Version: 2.4
|
2
|
+
Name: OpenPartsLibrary
|
3
|
+
Version: 0.1.4
|
4
|
+
Summary: Python library for creating a database of hardware components for manufacturing
|
5
|
+
Home-page: https://github.com/alekssadowski95/OpenPartsLibrary
|
6
|
+
Author: Aleksander Sadowski
|
7
|
+
Author-email: aleksander.sadowski@alsado.de
|
8
|
+
License: MIT
|
9
|
+
Classifier: Development Status :: 1 - Planning
|
10
|
+
Classifier: Intended Audience :: Science/Research
|
11
|
+
Classifier: License :: OSI Approved :: MIT License
|
12
|
+
Classifier: Programming Language :: Python :: 3
|
13
|
+
Description-Content-Type: text/markdown
|
14
|
+
License-File: LICENSE
|
15
|
+
Requires-Dist: sqlalchemy
|
16
|
+
Requires-Dist: datetime
|
17
|
+
Requires-Dist: pandas
|
18
|
+
Requires-Dist: openpyxl
|
19
|
+
Dynamic: author
|
20
|
+
Dynamic: author-email
|
21
|
+
Dynamic: classifier
|
22
|
+
Dynamic: description
|
23
|
+
Dynamic: description-content-type
|
24
|
+
Dynamic: home-page
|
25
|
+
Dynamic: license
|
26
|
+
Dynamic: license-file
|
27
|
+
Dynamic: requires-dist
|
28
|
+
Dynamic: summary
|
29
|
+
|
30
|
+
# OpenPartsLibrary
|
31
|
+
**OpenPartsLibrary** is a Python library designed to serve as a centralized parts database for Bill of Materials (BOM), Product Data Management (PDM), and Product Lifecycle Management (PLM) systems. It provides structured data models and APIs for managing components, part metadata, sourcing, and lifecycle states. OpenPartsLibrary streamlines integration with engineering workflows, enabling consistent part usage and traceability across design and manufacturing processes.
|
32
|
+
|
33
|
+
## Quickstart
|
34
|
+
|
35
|
+
Install the openpartslibrary via pip
|
36
|
+
```console
|
37
|
+
pip install OpenPartsLibrary
|
38
|
+
```
|
39
|
+
|
40
|
+
A minimal OpenPartsLibrary application looks something like this:
|
41
|
+
```python
|
42
|
+
from openpartslibrary.db import PartsLibrary
|
43
|
+
|
44
|
+
pl = PartsLibrary()
|
45
|
+
|
46
|
+
pl.display()
|
47
|
+
```
|
48
|
+
|
49
|
+
This will give you the following output, loading all the integrated parts of the library:
|
50
|
+
```console
|
51
|
+
id uuid number name ... supplier manufacturer_number unit_price currency
|
52
|
+
0 1 7dd559e06e1044c9b66e4a61df1072b6 SCRW-1000 Screw Type A 5mm ... Acme Fasteners MFG-625535 0.86 EUR
|
53
|
+
1 2 ced16afd527e483db362f44d6fcedd82 SCRW-1001 Screw Type A 5mm ... In-House Manufacturing MFG-807818 4.02 EUR
|
54
|
+
2 3 e3f8a20ab4974e45bca023a31c50e862 SCRW-1002 Screw Type C 2mm ... Precision Screws Ltd. MFG-543204 4.13 EUR
|
55
|
+
3 4 7115fbc429594f09881181a3503b62db SCRW-1003 Screw Type B 3mm ... In-House Manufacturing MFG-916662 3.52 EUR
|
56
|
+
4 5 8381dfa595854aa78b9d373d8a3f3f63 SCRW-1004 Screw Type A 1mm ... In-House Manufacturing MFG-742978 0.38 EUR
|
57
|
+
.. ... ... ... ... ... ... ... ... ...
|
58
|
+
115 116 67f3f0ec88974cdc8e9ac4eea5cf1351 SCRW-1115 Screw Type B 1mm ... In-House Manufacturing MFG-406022 3.95 EUR
|
59
|
+
116 117 a685e7b7135f48579a34ca45cf6baafe SCRW-1116 Screw Type B 10mm ... In-House Manufacturing MFG-230904 2.99 EUR
|
60
|
+
117 118 c5c256a8a8b04972ab87ef84110f7d5a SCRW-1117 Screw Type A 4mm ... BoltCo MFG-343539 0.23 EUR
|
61
|
+
118 119 2b9eda46cb8b45e093c084a437f01ba2 SCRW-1118 Screw Type B 1mm ... Precision Screws Ltd. MFG-247256 4.28 EUR
|
62
|
+
119 120 39a71a5ed7224ee0bf5e919870ebe0a3 SCRW-1119 Screw Type D 4mm ... HexTech MFG-293100 2.06 EUR
|
63
|
+
|
64
|
+
[120 rows x 24 columns]
|
65
|
+
```
|
66
|
+
|
67
|
+
## Working with the parts library
|
68
|
+
|
69
|
+
Creating a new part in the library:
|
70
|
+
```python
|
71
|
+
from openpartslibrary.models import Part
|
72
|
+
|
73
|
+
new_part = Part(
|
74
|
+
number='SCRW-2001',
|
75
|
+
name='Screw Type Z (Special) M5x14',
|
76
|
+
description='A special kind of screw for safety switches',
|
77
|
+
revision="1",
|
78
|
+
lifecycle_state="In Work",
|
79
|
+
owner='Max Mustermann',
|
80
|
+
material='Steel',
|
81
|
+
mass=0.03,
|
82
|
+
dimension_x=0.02,
|
83
|
+
dimension_y=0.005,
|
84
|
+
dimension_z=0.005,
|
85
|
+
quantity=100,
|
86
|
+
cad_reference='CAD REFERENCE',
|
87
|
+
attached_documents_reference='DOCUMENTS REFERENCE',
|
88
|
+
lead_time=10,
|
89
|
+
make_or_buy='make',
|
90
|
+
supplier='In-House Manufacturing',
|
91
|
+
manufacturer_number='MFN-100001',
|
92
|
+
unit_price=0.45,
|
93
|
+
currency='EUR'
|
94
|
+
)
|
95
|
+
pl.session.add(new_part)
|
96
|
+
pl.session.commit()
|
97
|
+
pl.display_reduced()
|
98
|
+
```
|
99
|
+
|
100
|
+
Loading a part from the library:
|
101
|
+
```python
|
102
|
+
part = pl.session.query(Part).filter(Part.number == 'SCRW-1002').first()
|
103
|
+
print(part)
|
104
|
+
```
|
105
|
+
|
106
|
+
Modifying a part from the library:
|
107
|
+
```python
|
108
|
+
part = pl.session.query(Part).filter(Part.number == 'SCRW-2001').first()
|
109
|
+
part.quantity -= 10
|
110
|
+
pl.session.commit()
|
111
|
+
pl.display_reduced()
|
112
|
+
```
|
113
|
+
|
114
|
+
Deleting a part from the library:
|
115
|
+
```python
|
116
|
+
part = pl.session.query(Part).filter(Part.number == 'SCRW-1003').delete()
|
117
|
+
pl.session.commit()
|
118
|
+
pl.display_reduced()
|
119
|
+
```
|
120
|
+
|
121
|
+
Getting the total value of all parts in the library:
|
122
|
+
```python
|
123
|
+
print('Total value of all parts in the library: ' + str(pl.total_value()) + ' EUR')
|
124
|
+
```
|
125
|
+
|
126
|
+
Creating parts from a parts list in a Excel-spreadsheet (*.xlsx). Take note, that the spreadsheet needs to implement the schema specified in this repository:
|
127
|
+
```python
|
128
|
+
pl.create_parts_from_spreadsheet('C:/Users/Work/Documents/Github/OpenPartsLibrary/openpartslibrary/sample/parts_data_sample.xlsx')
|
129
|
+
```
|
130
|
+
|
131
|
+
## Part schema
|
132
|
+
This table outlines the `Part` properties used in the OpenPartsLibrary.
|
133
|
+
|
134
|
+
| Property | Description |
|
135
|
+
|----------|-------------|
|
136
|
+
| `number` | Unique identifier for the part, often alphanumeric (e.g., `"MTR-12345"`). |
|
137
|
+
| `name` | Descriptive name of the part, typically used for display and search. |
|
138
|
+
| `description` | Detailed explanation of what the part is and its intended function. |
|
139
|
+
| `revision` | Version or iteration of the part (e.g., `"6"`). |
|
140
|
+
| `lifecycle_state` | Current status in the engineering lifecycle, like `"In Work"`, `"Released"`, `"Obsolete"`. |
|
141
|
+
| `owner` | Responsible person for the part. |
|
142
|
+
| `date_created` | Timestamp of when the part was first created in the system. |
|
143
|
+
| `date_modified` | Timestamp of the most recent update to the part. |
|
144
|
+
| `material` | The material from which the part is made (e.g., `"Aluminum 6061"`, `"ABS"`). |
|
145
|
+
| `mass` | Mass of the part, in kilograms. |
|
146
|
+
| `dimensions_x` | Length of the part along the X-axis, in millimeters. |
|
147
|
+
| `dimensions_y` | Width of the part along the Y-axis, in millimeters. |
|
148
|
+
| `dimensions_z` | Height of the part along the Z-axis, in millimeters. |
|
149
|
+
| `quantity` | Number of units of this part that are available. |
|
150
|
+
| `cad_file_reference` | Reference to the associated 3D CAD file (e.g. *.FCStd). |
|
151
|
+
| `attached_documents_reference` | References to external documents (e.g., datasheets, certifications). |
|
152
|
+
| `lead_time` | Expected procurement time, in days. |
|
153
|
+
| `make_or_buy` | Indicates whether the part is manufactured internally (`"Make"`) or externally sourced (`"Buy"`). |
|
154
|
+
| `supplier` | Preferred supplier or vendor name. |
|
155
|
+
| `manufacturer_number` | Vendor-specific identifier for the part, if purchased externally. |
|
156
|
+
| `unit_price` | Cost per individual unit of the part (e.g., `12.75`). |
|
157
|
+
| `currency` | Currency of the unit price (e.g., `EUR`). |
|
158
|
+
|
159
|
+
|
160
|
+
`id` and `uuid` will also be used internally, but database users does not have to worry about those.
|
@@ -1,8 +1,8 @@
|
|
1
1
|
openpartslibrary/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
2
2
|
openpartslibrary/db.py,sha256=FYyQuFdJZzERniBOyWQNCuRQ_v8ZrzgXhjHUbKY1tTk,3157
|
3
3
|
openpartslibrary/models.py,sha256=yVnyV0f7hSoTG30f1UVugeLNKLkk4osDEVUU2zIUQYk,2649
|
4
|
-
openpartslibrary-0.1.
|
5
|
-
openpartslibrary-0.1.
|
6
|
-
openpartslibrary-0.1.
|
7
|
-
openpartslibrary-0.1.
|
8
|
-
openpartslibrary-0.1.
|
4
|
+
openpartslibrary-0.1.4.dist-info/licenses/LICENSE,sha256=d0dlaVkR5u5bZVrTL-FmUyCoiu3o87Vc-MF1X-NYSXA,1076
|
5
|
+
openpartslibrary-0.1.4.dist-info/METADATA,sha256=sBJxfxr-O1YC1cC4qGeo9EfQ1TjUlvI65F9ReOrCKDM,7302
|
6
|
+
openpartslibrary-0.1.4.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
7
|
+
openpartslibrary-0.1.4.dist-info/top_level.txt,sha256=-26qZ2PdH7UxxjYQmnXDViKaFDd5Mb5e_Xp__WDTdKQ,17
|
8
|
+
openpartslibrary-0.1.4.dist-info/RECORD,,
|
@@ -1,30 +0,0 @@
|
|
1
|
-
Metadata-Version: 2.4
|
2
|
-
Name: OpenPartsLibrary
|
3
|
-
Version: 0.1.2
|
4
|
-
Summary: Python library for creating a database of hardware components for manufacturing
|
5
|
-
Home-page: https://github.com/alekssadowski95/OpenPartsLibrary
|
6
|
-
Author: Aleksander Sadowski
|
7
|
-
Author-email: aleksander.sadowski@alsado.de
|
8
|
-
License: MIT
|
9
|
-
Classifier: Development Status :: 1 - Planning
|
10
|
-
Classifier: Intended Audience :: Science/Research
|
11
|
-
Classifier: License :: OSI Approved :: MIT License
|
12
|
-
Classifier: Programming Language :: Python :: 3
|
13
|
-
Description-Content-Type: text/markdown
|
14
|
-
License-File: LICENSE
|
15
|
-
Requires-Dist: sqlalchemy
|
16
|
-
Requires-Dist: datetime
|
17
|
-
Requires-Dist: pandas
|
18
|
-
Requires-Dist: openpyxl
|
19
|
-
Dynamic: author
|
20
|
-
Dynamic: author-email
|
21
|
-
Dynamic: classifier
|
22
|
-
Dynamic: description
|
23
|
-
Dynamic: description-content-type
|
24
|
-
Dynamic: home-page
|
25
|
-
Dynamic: license
|
26
|
-
Dynamic: license-file
|
27
|
-
Dynamic: requires-dist
|
28
|
-
Dynamic: summary
|
29
|
-
|
30
|
-
Hello world
|
File without changes
|
File without changes
|
File without changes
|