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.3.1.tar.gz
(16.4 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.3.1-py3-none-any.whl
(16.9 kB
view details)
File details
Details for the file tme_eu-0.3.1.tar.gz.
File metadata
- Download URL: tme_eu-0.3.1.tar.gz
- Upload date:
- Size: 16.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7c17468b305f6f1872581ba1beabd942007ea0c5ba69e696dd496a151b9d20bb
|
|
| MD5 |
2d856ddc06c5a69b5f22f615968ca5d6
|
|
| BLAKE2b-256 |
60238b5709503e429a3de1d505eb92b055e9202c974188fbe36855d59c6ed914
|
File details
Details for the file tme_eu-0.3.1-py3-none-any.whl.
File metadata
- Download URL: tme_eu-0.3.1-py3-none-any.whl
- Upload date:
- Size: 16.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4ce8fad07b305848580c760dd3ef12aa3f46d5ee2e2f57db7d67d5efb3114453
|
|
| MD5 |
6be75bc8e3fddc631e532f82d73f907f
|
|
| BLAKE2b-256 |
154d896cc63c19f00c01a8a55abed67496b9add023d9b6437549507a74719c9e
|