Bienvenue dans le SDK Python MapFlow!
pip install mapflow-co-sdkfrom mapflow import MapFlowClient
# Initialiser le client avec votre clé API
client = MapFlowClient(api_key="votre-cle-api")
# Lister vos clients
customers = client.list_customers()
print(f"Vous avez {customers.count} client(s)")| Document | Description | Temps de lecture |
|---|---|---|
| QUICKSTART.md | Démarrage rapide | 5 min |
| README.md | Documentation complète | 15 min |
| API_REFERENCE.md | Référence API complète | Référence |
| USAGE_GUIDE.md | Patterns & bonnes pratiques | 20 min |
pip install mapflow-co-sdk
python verify_installation.py- Obtenez votre clé API sur https://app.mapflow.co/settings/api-keys
- Testez la connexion:
from mapflow import MapFlowClient
client = MapFlowClient(api_key="votre-cle")python examples/getting_started.pyexamples/basic_usage.py- Opérations CRUD de baseexamples/advanced_usage.py- Fonctionnalités avancées
examples/integration_example.py- Intégration complèteexamples/common_workflows.py- Cas d'usage courants
from mapflow import MapFlowClient, CustomerType
client = MapFlowClient(api_key="votre-cle-api")
customer = client.create_customer({
"customer_type": CustomerType.COMPANY,
"company_name": "Ma Société",
"email": "contact@societe.com",
"billing_city": "Paris"
})location = client.create_delivery_location({
"customer": customer.id,
"name": "Bureau Principal",
"address": "123 rue Example",
"zip_code": "75001",
"city": "Paris",
"country": "FR",
"latitude": 48.8566,
"longitude": 2.3522
})from mapflow import ItemType
produit = client.create_delivery_item({
"name": "Ordinateur Portable",
"item_type": ItemType.PRODUCT,
"weight": 2.5,
"weight_unit": "kg",
"is_fragile": True,
"declared_value": 1000.0,
"currency": "EUR"
})from mapflow import WarehouseType
entrepot = client.create_warehouse({
"name": "Hub Principal",
"code": "HUB-01",
"warehouse_type": WarehouseType.HUB,
"address": "100 rue Logistique",
"zip_code": "93200",
"city": "Saint-Denis",
"country": "FR",
"is_start_point": True,
"is_end_point": True
})# Importer des clients depuis votre système
for client_data in external_system.get_clients():
customer = client.create_customer({
"customer_type": "company",
"company_name": client_data['name'],
"external_id": client_data['id'],
"billing_city": client_data['city']
})# Trouver tous les clients actifs à Paris
paris_clients = client.list_customers(
billing_city="Paris",
is_active=True
)
# Trouver les produits fragiles
fragile = client.list_delivery_items(
is_fragile=True,
weight_min=0.5,
weight_max=10.0
)# Activer plusieurs clients d'un coup
result = client.customer_bulk_action(
action="activate",
customer_ids=[id1, id2, id3]
)
# Ajouter des tags en lot
result = client.vehicle_bulk_action(
action="add_tags",
vehicle_ids=[vehicle1, vehicle2],
tag_ids=[tag1, tag2]
)| Script | Description |
|---|---|
verify_installation.py |
Vérifier l'installation |
run_tests.py |
Lancer les tests |
examples/getting_started.py |
Assistant de démarrage |
examples/demo.py |
Démo interactive |
- QUICKSTART.md - Démarrage rapide
- README.md - Doc complète
- API_REFERENCE.md - Référence API
- USAGE_GUIDE.md - Guide d'utilisation
- INDEX.md - Index de la documentation
- 📖 Documentation API: https://mapflow.readme.io/reference
- 💬 Support: support@mapflow.co
- 🐛 Issues: https://github.com/mapflow/sdk-python/issues
Toutes les requêtes nécessitent une clé API valide:
- Obtenez-la sur https://app.mapflow.co/settings/api-keys
- Utilisez l'environnement de test pour le développement
- Ne committez jamais votre clé API dans le code!
- Test: Utilisez pour le développement
- Production: Utilisez pour la production avec données réelles
# Environnement de test
client_test = MapFlowClient(
api_key="votre-cle-test",
base_url="https://api-test.mapflow.co"
)
# Production
client_prod = MapFlowClient(
api_key="votre-cle-prod",
base_url="https://api.mapflow.co"
)Le SDK MapFlow Python est installé et prêt à l'emploi.
Commencez maintenant:
# Vérifier l'installation
python verify_installation.py
# Démarrage interactif
python examples/getting_started.py
# Ou lisez le guide rapide
cat QUICKSTART.md- Consultez INDEX.md pour trouver la bonne documentation
- Essayez les exemples dans
examples/ - Lisez USAGE_GUIDE.md pour les bonnes pratiques
- Contactez support@mapflow.co
Version: 1.0.0
Python: >=3.8
License: MIT
Bon développement! 🚀