Fedex Commercial Invoice Generation using Python (using reportlab)
### What is this repository for? ###
* A way to generate a commercial fedex invoice
* https://github.com/radzhome/fedex-commercial-invoice
### How do I get set up? ###
* download repo, install requirements.txt using pip
* to install globally, use `[sudo] python setup.py install`
### Usage ###
Generate Commercial Invoice
<pre><code>
# generate_invoice test
from fedex_invoice.invoice import generate_commercial_invoice
# Includes company info.
export_data = {'company': 'Radtek Inc.', 'address': '123 Main St.',
'city': 'Toronto', 'state_code': 'ON', 'postal_code': 'L8J 1V4', 'country_code': 'CA',
'waybill_no': '9999 9999 9999', 'export_date': '12/20/2015', 'export_refs': '999432423, 14314321423',
'export_country': 'USA', 'manufacture_country': 'CHINA',
'destination_country': 'CANADA'}
importer_data = {'first_name': 'Real First Name',
'last_name': 'Real Last Name',
'postal_code': 'M5A 3C6', 'country_code': 'CA', 'state_code': 'ON',
'city': 'North York', 'address': '123 Import St.'}
exporter_data = {'first_name': 'Real First Name',
'last_name': 'Real Last Name',
'postal_code': 'M5A 3C6', 'country_code': 'CA', 'state_code': 'ON',
'city': 'North York', 'address': '123 Export St.'}
cosignee_data = {'first_name': 'Real First Name',
'last_name': 'Real Last Name',
'postal_code': 'M5A 3C6', 'country_code': 'CA', 'state_code': 'ON',
'city': 'North York', 'address': '123 Cosignee St.'}
product1 = {'marks_nos': '1234', 'no_packages': 1, 'package_type': 'BOX',
'description': 'a description of the goods in a full and up to date way', 'quantity': 1,
'measure_unit': 'lbs', 'weight': 25, 'unit_value': 23.24, 'total_value': 23.24}
product2 = {'marks_nos': '12', 'no_packages': 1, 'package_type': 'OWN_PACKAGING',
'description': 'a description of the goods, another product to describe', 'quantity': 2,
'measure_unit': 'lbs', 'weight': 5, 'unit_value': 43.44, 'total_value': 43.44}
flags = {'fob': True, 'caf': True, 'cif': False}
products = [product1, product2, product1, product2, product1, product2]
generate_commercial_invoice(export_data, exporter_data, cosignee_data, products, flags, importer_data)
</code></pre>
See Sample for output example.
This repository can be used as a starting point for generating your own invoice. If you have a useful script, don't
hesitate to add it to the project.
Metadata
Release files for fedex-invoice 1.0.1
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 | |
|---|---|---|---|---|
| fedex-invoice-1.0.1.tar.gz | 6.2 kB | Without provenance | Details |
Release files / fedex-invoice-1.0.1.tar.gz
| Download URL | fedex-invoice-1.0.1.tar.gz |
|---|---|
| Size | 6.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a3533d3e3f375a673c6daf5a64285b5a44ab5ad4191e3340e05e74d4c8c3e347
|
|
BLAKE2b-256 checksum How to use checksums |
c41c66acb63e3f678b39fe99cc184dc0cee248f89a2b79116dde74fc8b38ce1d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for fedex-invoice 1.0.1
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.