Skip to content

akretion/roulier

This branch is up to date with master.

Folders and files

NameName
Last commit message
Last commit date
Apr 17, 2024
Oct 23, 2024
Oct 10, 2020
Jun 25, 2023
Jul 9, 2020
Jun 25, 2023
Apr 2, 2021
Jun 24, 2016
Oct 12, 2016
Apr 17, 2024
Apr 17, 2024
Jan 27, 2017
Dec 19, 2016
Nov 24, 2022
Nov 24, 2022
May 26, 2021
Dec 8, 2020
Jun 25, 2023
Jun 25, 2023

Repository files navigation

Roulier

Roulier is a shipping library written in Python for sending parcels. Roulier will get a label + tracking number to your carrier for you.

big picture

  • Roulier runs on your server and call each carrier API directly.
  • You have to use your own credentials provided by each carriers.
  • Roulier is Open Source software, AGPL-3
  • Roulier integrate a multitude of carriers
    • French La Poste
    • French DPD
    • French GLS
    • French Chronopost
    • more to come... (geodis, kuehne...)

Installation

This is not compatible with python 2.7. Please use version < 1.0.0 (python2 branch) in that case.

Usage

from roulier import roulier

payload= {
	"auth": {
		"login": "12345",
		"password": "password",
	},
	"service": {
		"productCode": "COL"
	},
	"parcels": [{
		"weight": 3.4,
	}],
	"to_address": {
		"firstName": "Hparfr"
		"street1": "35 b Rue Montgolfier"
		"city": "Villeurbanne"
        "country": "FR",
        "zip": "69100"
   	},
   	"from_address": {
		"fristName": "Akretion France"
		"street1": "35 b Rue Montgolfier"
		"city": "Villeurbanne"
        "country": "FR",
        "zip": "69100"
   	},
}
# first parameter is the carrier type.
# second is the action and then the parameters needed by the action
response = roulier.get('laposte_fr', 'get_label', payload)


print(response)

Get supported carriers and related actions:

from roulier import roulier
print(roulier.get_carriers_action_available())

Known Issues

French GLS carrier :

  • The glsbox webservice only manage Basic products : BP, EBP, GBP
  • In the rest webservice, the incoterms don't work

Development

To release, increase the version number (in VERSION file) and create a tagged release on GitHub, with the same number. This will trigger publishing to PyPI.

Contributors

Dependencies