Skip to main content

Python client to SAGEC MRW webservices.

Project description

https://travis-ci.org/migonzalvar/pysagec.svg?branch=master https://codecov.io/github/migonzalvar/pysagec/coverage.svg?branch=master

pysagec is a Python library to use with SAGEC MRW webservices.

It aims to be simple to use but with the ability to use any of the fields of the underlying API:

import pysagec
import datetime as dt

url = '//user:pass@example.com/?franchise=12&subscriber=34&department=56'

client = pysagec.create_client(url)

pickup_info = pysagec.PickupInfo(
    pickup_address=pysagec.Address(street_name='Plaza de España',
                                   postal_code='36001',
                                   city='Pontevedra'),
    recipient_name='Juan Pérez',
    recipient_phone_number='555555555',
    comments='Por las mañanas.',
)

service_info = pysagec.ServiceInfo(
    number_of_packages=1,
    date=dt.date.today(),
    service_code='0000',
)

response = client.send(pickup_info, service_info)

print(response.shipping_number)

Features

  • Use python classes instead of XML.

  • Simplify method invocation.

  • It has no dependencies, only standard library.

Installation

Install pysagec from PyPI:

$ pip install pysagec

Change log

Unreleased

0.1.1 - 2016-09-02

  • Add an example.

  • Include more models into __init__.

0.1.0 - 2016-08-25

  • First production ready release.

License

MIT.

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

pysagec-0.1.1.tar.gz (10.6 kB view details)

Uploaded Source

Built Distribution

pysagec-0.1.1-py2.py3-none-any.whl (9.3 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file pysagec-0.1.1.tar.gz.

File metadata

  • Download URL: pysagec-0.1.1.tar.gz
  • Upload date:
  • Size: 10.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for pysagec-0.1.1.tar.gz
Algorithm Hash digest
SHA256 a4f9a1aa3637d22f75c24b5b0f33ba213f56257544255945e03d29bfe2f5d05b
MD5 dae2fde92c6e021fd5f15e8ddf3df617
BLAKE2b-256 6de54ab7996edd36f6540c1674f1b5300f0329f773636a2571df212dbbe86dc6

See more details on using hashes here.

Provenance

File details

Details for the file pysagec-0.1.1-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for pysagec-0.1.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 cbe8d8ed7e5ad661c2eb73c3a8c61041fd723a0a1019e802f77cdc1074d5fda6
MD5 77ea2a9b4bca81117048af00abc945ed
BLAKE2b-256 fdb1b2d0ea1db5b4328412c78dde51fbb7104c538fd3c435f905c65b3f9e8516

See more details on using hashes here.

Provenance

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