Skip to main content

django-moova

Starting

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

Current features

  • Create shipment.
  • Get tracking info.
  • Get shipping label.

Pre-requisitos

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

Installation

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

or

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

and, install in your project django

pip install {{path}}/django-moova/dist/{{tar.gz file}}
  1. Settings in django project
DJANGO_MOOVA = {
    'MOOVA': {
        'BASE_URL': '<MOOVA_BASE_URL>',
        'SECRET': '<MOOVA_SECRET_TOKEN>',
        'KEY': '<MOOVA_SECRET_KEY>',
        'CURRENCY': 'CLP',
        'TYPE': 'regular',
        'FLOW': 'manual',
        'INTERNALCODE': 'XX5555WWW123',
        'EXTRA': {},
        'ASSURANCE': False,
    },
    'REMITENTE': {
        'STREET': '<STREET>',
        'NUMBER': '<NUMBER>',
        'FLOOR': '<FLOOR>',
        'APARTMENT': '',
        'CITY': '<CITY>',
        'STATE': '<STATE>',
        'POSTALCODE': '<POSTAL_CODE>',
        'COUNTRY': 'CHL',
        'INSTRUCTIONS': 'Call before delivery',
        'FIRST_NAME': '<FIRST_NAME>',
        'LAST_NAME': '<LAST_NAME>',
        'EMAIL': '<EMAIL>',
        'PHONE': '<PHONE>',
    },
}

Usage

  1. Create shipment:
from moova.handler import MoovaHandler

handler = MoovaHandler()

default_data = handler.get_default_payload(instance)
default_data["currency"] = "CLP" # eg. (Optional)
response = handler.create_shipping(default_data)
  1. Get tracking info:
from moova.handler import MoovaHandler

handler = MoovaHandler()

tracking_info = handler.get_tracking(<identifier>)
  1. Get shipping label:
from moova.handler import MoovaHandler

handler = MoovaHandler()

label_info = handler.get_shipping_label(<shipping_id>)

Output:
'https://moova-user-data-test.s3.amazonaws.com/etiqueta-10x15.pdf'

Metadata

Release files for django-moova 2.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for django-moova 2.1.0
File Size Uploaded Provenance Actions
django-moova-2.1.0.tar.gz 6.0 kB Without provenance Details for django-moova-2.1.0.tar.gz

Release files / django-moova-2.1.0.tar.gz

Download URL django-moova-2.1.0.tar.gz
Size 6.0 kB
Tags Source
SHA-256 checksum
How to use checksums
12d41af626ebb74aa5f28e74bb5d52c8d2e4ba11206821b1eb8b39139de61c3a
BLAKE2b-256 checksum
How to use checksums
6ebfd3393e1cd6d80192b730e1e3171e37d8d1bc2e9f0814201c292f7ec67db1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.4.2 requests/2.22.0 setuptools/57.1.0 requests-toolbelt/0.8.0 tqdm/4.30.0 CPython/3.8.5

Security for django-moova 2.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page