Skip to main content

Django Enviame Integration

Project description

django-enviame

Starting

These instructions will allow you to install the library in your python project.

Current features

  • Create shipment.
  • Get tracking info.

Pre-requisitos

  • Python >= 3.7
  • Django >= 3
  • requests >= 2

Installation

  1. To get the latest stable release from PyPi:
pip install django-enviame

or

  1. From a build
git clone https://gitlab.com/linets/ecommerce/oms/integrations/oms-enviame
cd {{project}}
python setup.py sdist

and, install in your project django

pip install {{path}}/django-enviame/dist/{{tar.gz file}}
  1. Settings in django project
DJANGO_ENVIAME = {
    'ENVIAME': {
        'BASE_URL': 'https://stage.api.enviame.io/api/s2/v2/',
        'COMPANY_ID': '620',
        'API_KEY': '7d066821f33647851bffb8802bf81113',
        'COD_BOD': 'cod_bod',
    },
}

Usage

  1. Create shipment:
from enviame.handler import EnviameHandler

handler = EnviameHandler()

default_data = handler.get_default_payload(instance)
default_data["carrier"]["carrier_code"] = "BLX" # eg. (Optional)
response = handler.send_data(default_data)
  1. Get tracking info:
from enviame.handler import EnviameHandler

handler = EnviameHandler()

tracking_info = handler.get_tracking(<identifier>)

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

django-enviame-1.0.2.tar.gz (5.3 kB view details)

Uploaded Source

File details

Details for the file django-enviame-1.0.2.tar.gz.

File metadata

  • Download URL: django-enviame-1.0.2.tar.gz
  • Upload date:
  • Size: 5.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.1

File hashes

Hashes for django-enviame-1.0.2.tar.gz
Algorithm Hash digest
SHA256 67272ce4e822a287ea61b6ed7f3b09d016b2b14efb8fbb2d5bf4e8147d589181
MD5 d646a82305c77a43bd3502c191e256b2
BLAKE2b-256 384e876207e5d2763650b45be5116da0603f209c90119bcfb80a65c74fd8568a

See more details on using hashes here.

Supported by

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