OpenPartsLibrary 0.1.8__tar.gz → 0.1.11__tar.gz
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.8 → openpartslibrary-0.1.11/OpenPartsLibrary.egg-info}/PKG-INFO +2 -2
- {openpartslibrary-0.1.8/OpenPartsLibrary.egg-info → openpartslibrary-0.1.11}/PKG-INFO +2 -2
- {openpartslibrary-0.1.8 → openpartslibrary-0.1.11}/README.md +1 -1
- {openpartslibrary-0.1.8 → openpartslibrary-0.1.11}/openpartslibrary/db.py +7 -4
- {openpartslibrary-0.1.8 → openpartslibrary-0.1.11}/openpartslibrary/models.py +47 -9
- {openpartslibrary-0.1.8 → openpartslibrary-0.1.11}/setup.py +1 -1
- {openpartslibrary-0.1.8 → openpartslibrary-0.1.11}/LICENSE +0 -0
- {openpartslibrary-0.1.8 → openpartslibrary-0.1.11}/OpenPartsLibrary.egg-info/SOURCES.txt +0 -0
- {openpartslibrary-0.1.8 → openpartslibrary-0.1.11}/OpenPartsLibrary.egg-info/dependency_links.txt +0 -0
- {openpartslibrary-0.1.8 → openpartslibrary-0.1.11}/OpenPartsLibrary.egg-info/requires.txt +0 -0
- {openpartslibrary-0.1.8 → openpartslibrary-0.1.11}/OpenPartsLibrary.egg-info/top_level.txt +0 -0
- {openpartslibrary-0.1.8 → openpartslibrary-0.1.11}/openpartslibrary/__init__.py +0 -0
- {openpartslibrary-0.1.8 → openpartslibrary-0.1.11}/openpartslibrary/cli.py +0 -0
- {openpartslibrary-0.1.8 → openpartslibrary-0.1.11}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: OpenPartsLibrary
|
3
|
-
Version: 0.1.
|
3
|
+
Version: 0.1.11
|
4
4
|
Summary: Python library for creating a database of hardware components for manufacturing
|
5
5
|
Home-page: https://github.com/alekssadowski95/OpenPartsLibrary
|
6
6
|
Author: Aleksander Sadowski
|
@@ -131,7 +131,7 @@ Creating parts from a parts list in a Excel-spreadsheet (*.xlsx). Take note, tha
|
|
131
131
|
pl.create_parts_from_spreadsheet('C:/Users/Work/Documents/Github/OpenPartsLibrary/openpartslibrary/sample/parts_data_sample.xlsx')
|
132
132
|
```
|
133
133
|
## Database structure
|
134
|
-
<img src="./Database-structure-openpartslibrary.png" width="100%" alt="OpenPartsLibrary database structure"></img>
|
134
|
+
<img src="./openpartslibrary/images/Database-structure-openpartslibrary.png" width="100%" alt="OpenPartsLibrary database structure"></img>
|
135
135
|
|
136
136
|
## Part schema
|
137
137
|
This table outlines the `Part` properties used in the OpenPartsLibrary.
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: OpenPartsLibrary
|
3
|
-
Version: 0.1.
|
3
|
+
Version: 0.1.11
|
4
4
|
Summary: Python library for creating a database of hardware components for manufacturing
|
5
5
|
Home-page: https://github.com/alekssadowski95/OpenPartsLibrary
|
6
6
|
Author: Aleksander Sadowski
|
@@ -131,7 +131,7 @@ Creating parts from a parts list in a Excel-spreadsheet (*.xlsx). Take note, tha
|
|
131
131
|
pl.create_parts_from_spreadsheet('C:/Users/Work/Documents/Github/OpenPartsLibrary/openpartslibrary/sample/parts_data_sample.xlsx')
|
132
132
|
```
|
133
133
|
## Database structure
|
134
|
-
<img src="./Database-structure-openpartslibrary.png" width="100%" alt="OpenPartsLibrary database structure"></img>
|
134
|
+
<img src="./openpartslibrary/images/Database-structure-openpartslibrary.png" width="100%" alt="OpenPartsLibrary database structure"></img>
|
135
135
|
|
136
136
|
## Part schema
|
137
137
|
This table outlines the `Part` properties used in the OpenPartsLibrary.
|
@@ -102,7 +102,7 @@ Creating parts from a parts list in a Excel-spreadsheet (*.xlsx). Take note, tha
|
|
102
102
|
pl.create_parts_from_spreadsheet('C:/Users/Work/Documents/Github/OpenPartsLibrary/openpartslibrary/sample/parts_data_sample.xlsx')
|
103
103
|
```
|
104
104
|
## Database structure
|
105
|
-
<img src="./Database-structure-openpartslibrary.png" width="100%" alt="OpenPartsLibrary database structure"></img>
|
105
|
+
<img src="./openpartslibrary/images/Database-structure-openpartslibrary.png" width="100%" alt="OpenPartsLibrary database structure"></img>
|
106
106
|
|
107
107
|
## Part schema
|
108
108
|
This table outlines the `Part` properties used in the OpenPartsLibrary.
|
@@ -13,9 +13,12 @@ import os
|
|
13
13
|
|
14
14
|
|
15
15
|
class PartsLibrary:
|
16
|
-
def __init__(self):
|
16
|
+
def __init__(self, db_path=None):
|
17
17
|
import os
|
18
|
-
|
18
|
+
if db_path is not None:
|
19
|
+
sqlite_path = db_path
|
20
|
+
else:
|
21
|
+
sqlite_path = os.path.join(os.path.dirname(__file__), 'data', 'parts.db')
|
19
22
|
print(sqlite_path)
|
20
23
|
self.engine = create_engine('sqlite:///' + sqlite_path)
|
21
24
|
|
@@ -28,14 +31,14 @@ class PartsLibrary:
|
|
28
31
|
# Print the components table to the terminal
|
29
32
|
component_component_table = pd.read_sql_table(table_name="component_component", con=self.engine)
|
30
33
|
print('ComponentComponent:')
|
31
|
-
print('
|
34
|
+
print('===================')
|
32
35
|
print(component_component_table)
|
33
36
|
print('')
|
34
37
|
|
35
38
|
# Print the components table to the terminal
|
36
39
|
components_table = pd.read_sql_table(table_name="components", con=self.engine)
|
37
40
|
print('Components:')
|
38
|
-
print('
|
41
|
+
print('===========')
|
39
42
|
print(components_table)
|
40
43
|
print('')
|
41
44
|
|
@@ -51,7 +51,6 @@ class File(Base):
|
|
51
51
|
part_id = Column(ForeignKey('parts.id'))
|
52
52
|
part = relationship('Part', back_populates='cad_reference')
|
53
53
|
|
54
|
-
|
55
54
|
class Part(Base):
|
56
55
|
__tablename__ = 'parts'
|
57
56
|
|
@@ -112,17 +111,56 @@ class Supplier(Base):
|
|
112
111
|
def to_dict(self):
|
113
112
|
return {column.name: getattr(self, column.name) for column in self.__table__.columns}
|
114
113
|
|
115
|
-
class
|
116
|
-
__tablename__ =
|
114
|
+
class Material(Base):
|
115
|
+
__tablename__ = "materials"
|
117
116
|
|
118
117
|
id = Column(Integer, primary_key=True)
|
119
118
|
uuid = Column(String(32), unique=True, nullable=False)
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
119
|
+
# General information
|
120
|
+
name = Column(String, nullable=False) # e.g. Steel plate 12 mm
|
121
|
+
standard_number = Column(String) # Standardized number (e.g., 1.4301)
|
122
|
+
density = Column(Float) # g/cm³
|
123
|
+
|
124
|
+
# Mechanical properties
|
125
|
+
elastic_modulus = Column(Float) # Young’s modulus (GPa)
|
126
|
+
shear_modulus = Column(Float) # Shear modulus (GPa)
|
127
|
+
poisson_ratio = Column(Float) # Dimensionless
|
128
|
+
tensile_strength = Column(Float) # Rm, MPa
|
129
|
+
yield_strength = Column(Float) # Re or Rp0.2, MPa
|
130
|
+
fatigue_strength = Column(Float) # Endurance limit, MPa
|
131
|
+
elongation = Column(Float) # Elongation at break, %
|
132
|
+
hardness = Column(Float) # hardness value, scale also has to specified
|
133
|
+
hardness_scale = Column(String) # e.g., HB, HV, HRC
|
134
|
+
toughness = Column(Float) # Charpy impact energy, J
|
135
|
+
|
136
|
+
# Physical properties
|
137
|
+
thermal_conductivity = Column(Float) # W/mK
|
138
|
+
specific_heat_capacity = Column(Float) # J/kgK
|
139
|
+
thermal_expansion = Column(Float) # 1/K
|
140
|
+
electrical_conductivity = Column(Float) # S/m
|
141
|
+
magnetic_behavior = Column(String) # Ferromagnetic, paramagnetic, diamagnetic
|
142
|
+
|
143
|
+
# Chemical properties
|
144
|
+
oxidation_resistance_air = Column(String) # good, limited, poor
|
145
|
+
|
146
|
+
# Technological properties
|
147
|
+
weldability = Column(String) # good, limited, poor
|
148
|
+
castability = Column(String) # good, limited, poor
|
149
|
+
formability = Column(String) # good, limited, poor
|
150
|
+
machinability = Column(String) # good, limited, poor
|
151
|
+
hardenability = Column(String) # good, limited, poor
|
152
|
+
|
153
|
+
# Operational properties
|
154
|
+
temperature_min = Column(String) # Usable min temperature
|
155
|
+
temperature_max = Column(String) # Usable max temperature
|
156
|
+
wear_resistance = Column(String) # good, limited, poor
|
157
|
+
|
158
|
+
# Economic aspects
|
159
|
+
price = Column(Float) # Price per kg, currency also has to be specified separately
|
160
|
+
currency = Column(String) # Currency for the price per kg
|
161
|
+
availability = Column(String) # available/ not available
|
162
|
+
lead_time = Column(Integer) # lead time for delivery in days
|
163
|
+
|
126
164
|
|
127
165
|
'''
|
128
166
|
Relationship tables
|
@@ -8,7 +8,7 @@ long_description = (this_directory / "README.md").read_text()
|
|
8
8
|
|
9
9
|
setup(
|
10
10
|
name='OpenPartsLibrary',
|
11
|
-
version='0.1.
|
11
|
+
version='0.1.11',
|
12
12
|
description='Python library for creating a database of hardware components for manufacturing',
|
13
13
|
long_description=long_description,
|
14
14
|
long_description_content_type='text/markdown',
|
File without changes
|
File without changes
|
{openpartslibrary-0.1.8 → openpartslibrary-0.1.11}/OpenPartsLibrary.egg-info/dependency_links.txt
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|