Skip to main content

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.2.tar.gz (16.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tme_eu-0.3.2-py3-none-any.whl (17.0 kB view details)

Uploaded Python 3

File details

Details for the file tme_eu-0.3.2.tar.gz.

File metadata

  • Download URL: tme_eu-0.3.2.tar.gz
  • Upload date:
  • Size: 16.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.22

File hashes

Hashes for tme_eu-0.3.2.tar.gz
Algorithm Hash digest
SHA256 0d207009dc561c32a71d58e99931318d28bf2dc2a4a8f0ba69c7bc4bfd6f91f9
MD5 e859b1988726a52a2246cea79c5405ab
BLAKE2b-256 9082d96ba150b47a3bace2fe29a278d55ac77f40a00e75e007360238898a32f7

See more details on using hashes here.

File details

Details for the file tme_eu-0.3.2-py3-none-any.whl.

File metadata

  • Download URL: tme_eu-0.3.2-py3-none-any.whl
  • Upload date:
  • Size: 17.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.22

File hashes

Hashes for tme_eu-0.3.2-py3-none-any.whl
Algorithm Hash digest
SHA256 e12228738a624ed781fb225421b7a787ef2b7a5b4d6f6726bb104c472ef4506e
MD5 230e9c785fa63dea83ee6d1e4badb870
BLAKE2b-256 cd0fb1d24c2584df9d797d317f87241c9fea02203cfe12fd3a9afc8e1f122541

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page