Python API client for Jet.com
Python Jet.com API Client
Installation
pip install jet-python
Usage
Get an authenticated jet client
from jet import Jet
jet = Jet(
user='0CXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX',
secret='NXXXXXXXXXXXXXXXXXXXXXXXXj+',
merchant_id='d4fe23456789876545678656787652',
)
Fetch 10 products at a time
skus = jet.products.get_skus(page=1)
Find ready to ship orders
order_ids = jet.orders.get_recent_order_ids(
status='ready'
)
Acknowledge an order
jet.orders.acknowledge(order_id)
Mark an order as shipped
This involved a nested data structure. To make this easier this module provides a convenient higher level data structure called jet.Shipment
from jet import Shipment
shipment = Shipment(
shipment_id='CS1234',
tracking_number='1Z12324X12342435',
ship_from_zip_code='91789',
shipment_date=date.today(),
carrier='UPS',
shipment_method='Other'
)
for item in items:
shipment.add_item(
sku='iphone-xs',
quantity=2,
)
jet.orders.ship(order_id, [shipment])
Features
TODO
Integration Approval API calls
from jet import Jet
jet = Jet('XXX', 'XXX', 'XXXX')
jet.products.update_price('IPHONE-8', 79.99)
# Fulfillment node id prodived by approval workflow
jet.products.update_inventory('IPHONE-8', {'998bb45c821d4d5a84e73d68004f898b': 5})
# Get orders
order_ids = jet.orders.get_recent_order_ids('ready')
# Acknowledge an order
jet.orders.acknowledge(
'6b07db3d2e5643479242527332782dee',
{'a35bd1f8a8ab4481a0cccda6e2012e13': 'fulfillable'}
)
# Acknowledge order
jet.orders.acknowledge(
'e0d9e28d650d44daaa55f297847c0ab2',
order_items={'69585063be2a46ccb5dbf75823a3e7c1': 'fulfillable'}
)
# Cancelling an order
shipment = Shipment(shipment_id='CS1234')
shipment.add_item("RBE750-GOL", quantity=0, cancel_quantity=1)
jet.orders.ship('e0d9e28d650d44daaa55f297847c0ab2', [shipment])
Documentation
The full documentation is at http://jet-python.rtfd.org.
History
0.1.0 (2019-04-01)
First release on PyPI.
Metadata
Release files for jet-python 0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| jet-python-0.2.tar.gz | 8.4 kB | Without provenance | Details for jet-python-0.2.tar.gz |
Release files / jet-python-0.2.tar.gz
| Download URL | jet-python-0.2.tar.gz |
|---|---|
| Size | 8.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ae409872bc644963b659b283a0f0a5cd0d166afe52e6d193df5c72e9721836ac
|
|
BLAKE2b-256 checksum How to use checksums |
102cbbde3ae284fb3efb9d66868ce554ebf112078dc1155e9a452087c2379fbb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
Python-urllib/2.7
|
Security for jet-python 0.2
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.