Api for TME.eu
Project description
TME.eu API Client
from tmeapi import TmeApi, Ok, ErrorValidation, ErrorSignature
import os
api = TmeApi(os.environ["TME_KEY"].strip(), os.environ["TME_APP_SECRET"].strip())
print(api.autocomplete("555"))
print(api.get_prices(["EL-MAKR04120PA-TC"]))
print(api.get_prices_and_stock(["EL-MAKR04120PA-TC"]))
resp = api.get_categories(tree=True, category_id=112140)
match resp:
case Ok(Data=categories):
products = api.get_symbols(categories.CategoryTree.Id).unwrap()
product_details = api.get_products([products.SymbolList[0]]).unwrap()
print(product_details.ProductList[0])
case ErrorSignature() | ErrorValidation():
print(f"Failed with {resp}")
NOTE: currently a limited api/typing surface, if you encounter any errors please submit an issue
[project.urls] Homepage = "https://github.com/i404788/tme-api" Repository = "https://github.com/i404788/tme-api"
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
tme_eu-0.2.0.tar.gz
(16.1 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
tme_eu-0.2.0-py3-none-any.whl
(16.6 kB
view details)
File details
Details for the file tme_eu-0.2.0.tar.gz.
File metadata
- Download URL: tme_eu-0.2.0.tar.gz
- Upload date:
- Size: 16.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.5.27
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
29fd05c8699fb605514bd7948a7e570184126d1418d30c3e8028c2e747b08489
|
|
| MD5 |
a2ecab70d7b44cdf2634788d00962aa8
|
|
| BLAKE2b-256 |
971cbdd4d5fd7935e000e4530dd29b18cc4ec38acc29fc4574883a4d9c9547b4
|
File details
Details for the file tme_eu-0.2.0-py3-none-any.whl.
File metadata
- Download URL: tme_eu-0.2.0-py3-none-any.whl
- Upload date:
- Size: 16.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.5.27
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ff17f168382a6bf9b1d42199faeaa17299cebac7a0b797840ea8653560e9dc20
|
|
| MD5 |
e332bad086c90b6e309d25037c56a334
|
|
| BLAKE2b-256 |
dbdaf5159ced05521ae56968a227c8c3aada75dcfb9b21ef0d6e38873e29f830
|