Skip to main content

Software Development Kit (SDK) pour accéder à l'API E-Commerce (Data Analysts/ Data Scientists)

Project description

E-commerce SDK - e-commerce-franck-sdk

Un SDK Python simple pour interagir avec l’API REST E-commerce. Il est conçu pour les Data Analysts et Data Scientists, avec une prise en charge native de Pydantic, dictionnaires et DataFrames Pandas.

PyPI version License: MIT


Installation

pip install e-commerce-franck-sdk

Configuration

from e-commerce-franck-sdk import E_commerceClient, E_commerceConfig

config = E_commerceConfig(e_commerce_base_url="https://projet-backend-e-commerce-1.onrender.com")
client = E_commerceClient(config=config)

Tester le SDK

1. Health check

client.health_check()

2. Récupérer une vente

vente = client.get_vente(id_commande=9, id_client=9, id_produit=9)
print("Vente récupérée :", vente)

3. Récupère la Liste des ventes avec pagination et filtres.

ventes = client.list_ventes(output_format="pandas")
print(ventes)

Modes de sortie disponibles

Toutes les methodes de filtrage par id sont : (get_vente, get_client, get_produit, etc). Toutes les méthodes de liste (list_ventes, list_clients, list_produits, etc.) peuvent retourner :

  • des objets Pydantic (défaut)
  • des dictionnaires
  • des DataFrames Pandas

Exemple :

client.list_produits(limit=10, output_format="dict")
client.list_clients(limit=10, output_format="pandas")

Tester en local

Vous pouvez aussi utiliser une API locale :

Conteneur Kocker

config = E_commerceConfig(e_commerce_base_url="http://localhost:80")
client = E_commerceClient(config=config)

Public cible

  • Data Analysts
  • Data Scientists
  • Étudiants et curieux en Data
  • Développeurs Python

Licence

MIT License


Liens utiles

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

e_commerce_franck_sdk-0.0.2.tar.gz (6.0 kB view details)

Uploaded Source

Built Distribution

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

e_commerce_franck_sdk-0.0.2-py3-none-any.whl (6.2 kB view details)

Uploaded Python 3

File details

Details for the file e_commerce_franck_sdk-0.0.2.tar.gz.

File metadata

  • Download URL: e_commerce_franck_sdk-0.0.2.tar.gz
  • Upload date:
  • Size: 6.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.9

File hashes

Hashes for e_commerce_franck_sdk-0.0.2.tar.gz
Algorithm Hash digest
SHA256 8568a698b261825a926c4f83b07ccd761c0c7b8e7ddf7310a3250322a1ff8f58
MD5 88c289f6c0a1e033e90fcc5ba432d699
BLAKE2b-256 09e6b0bc17dfecde388581ca16469a86e28c8e9e146e80bb99144979fe4baf7e

See more details on using hashes here.

File details

Details for the file e_commerce_franck_sdk-0.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for e_commerce_franck_sdk-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 f7779542dd00fe20ad489c700fe70b92cdb8039ddd75cb410ed712494e148194
MD5 32c08bc847be96acd04296e5569c47a2
BLAKE2b-256 81905da51bd0a1e6f706eeb0e1141bf0164cab26b3fbdea3325f519c5cffb134

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