/tracktrace

Primary LanguagePythonMIT LicenseMIT

tracktrace

Track shipping containers across all major shipping lines as well as Class 1 North American railways.

✔️ - Supported

✅ - Not supported yet

Ocean

Steamship Line SCAC Supported Container Tracking Website iOS App Android App
Alianca ANRM ✔️ Link No No
APL APLU ✔️ Link Yes Yes
Arkas Container Transport ARKU Link No No
CMA CGM CMDU ✔️ Link Yes No
Cosco COSU Link Yes No
Emirates Shipping Line ESPU Link Yes Yes
Evergreen EGLV Link No Yes
Hamburg SUD SUDU ✔️ Link No No
Hapag Lloyd HLCU ✔️ Link Yes Yes
Hyundai Merchant Marine (HMM) HDMU Link Yes Yes
Maersk MAEU Link Yes Yes
Matson MATS Link Yes Yes
Mediterranean Shipping Company (MSC) MSCU ✔️ Link Yes Yes
ONE Line ONEY ✔️ Link No No
Orient Overseas Container Line (OOCL) OOLU Link Yes Yes
Pacific International Lines (PIL) PCIU Link No No
Wan Hai Lines WHLC Link Yes Yes
Yang Ming YMLU Link Yes Yes
Zim Integrated Shipping Services (ZIM) ZIMU Link Yes Yes

Rail

Railroads often require an account to track containers. At certain railroads, you also need to be a Notify Party to access tracking information.

For example, BNSF doesn't show any tracking information if your company is not a Notify Party. UP, on the other hand, shows partial tracking information.

Railroad Supported Need Account Need to be a Notify Party
BNSF Railway (BNSF) Yes Yes
Canadian National Railway (CN) Yes Yes
Canadian Pacific Railway (CPR) Yes Yes
CSX Transportation (CSX) No No
Ferromex Yes Don't know
Kansas City Southern Railway (KCS) Yes Yes
Norfolk Southern Railway (NS) Yes No
Union Pacific Railway (UP) Yes No

Installation

pip install tracktrace 

Usage example

>>> from tracktrace import ocean
>>>
>>> container = "MEDU3288655"
>>> scac = "MSCU"
>>> 
>>> shipment = ocean.container.create(scac=scac, container=container)
>>>
>>> shipment.updates

[{'location': 'USSTL',
  'vessel': 'TRUCK',
  'voyage': '',
  'movement': 'Empty container returned',
  'mode': 'TR',
  'date': DateTime(2020, 12, 11, 15, 44, 0, tzinfo=Timezone('UTC'))},
 {'location': 'USESL',
  'vessel': 'CSX TRANSPORTATION',
  'voyage': '',
  'movement': 'Rail last free day',
  'mode': '',
  'date': DateTime(2020, 12, 8, 23, 59, 0, tzinfo=Timezone('UTC'))},
 {'location': 'USSTL',
  'vessel': 'TRUCK',
  'voyage': '',
  'movement': 'Full import container out gated',
  'mode': 'TR',
  'date': DateTime(2020, 12, 8, 19, 27, 0, tzinfo=Timezone('UTC'))},
 {'location': 'USESL',
  'vessel': 'CSX TRANSPORTATION',
  'voyage': '',
  'movement': 'Notified',
  'mode': '',
  ...
  ...
  ...
  ...

Release History

  • 0.0.5
    • Work in progress

Meta

Dhruv Kar – dhruvkardhruv@wints.org

Distributed under the MIT license. See LICENSE for more information.

https://github.com/dhruvkar/

Contributing

  1. Fork it (https://github.com/dhruvkar/tracktrace/fork)
  2. Create your feature branch (git checkout -b feature/fooBar)
  3. Commit your changes (git commit -am 'Add some fooBar')
  4. Push to the branch (git push origin feature/fooBar)
  5. Create a new Pull Request