Fleetmonger
Python wrapper for the fleetmon.com ship-tracking API.
API Calls
Read the details of the API at Fleetmonger. * fleetmonger.myfleet * fleetmonger.vessel * fleetmonger.vesselparticulars * fleetmonger.vesselurl * fleetmonger.porturl * fleetmonger.weather * fleetmonger.containerschedule
Note that some API calls require the purchase of credits at Fleetmon. This package is unaffiliated with Fleetmon, use at your own risk.
Usage
from fleetmonger import Fleetmonger
fm = Fleetmonger('username', 'your key')
fleet = fm.myfleet()
for ship in fleet:
print ship.name, ship.destination
Vessels
my_vessel = fleet[0] # or my_vessel = fm.vessel(mmsi='239725000') # or my_vessel = fm.vessel(imo='9197545') # or my_vessel = fm.vessel(name='MINNOW') # Passing incomplete information will raise an error my_vessel = fm.vessel() # ValueError my_vessel.name # <SS MINNOW> my_vessel.navigationstatus # 'On a three hour tour' my_vessel.etatime # datetime.datetime(1964, 9, 26, 12, 0, tzinfo=<UTC>) my_vessel.coords # (3.469557, -167.255859) # Missing attributes return None my_vessel.location # None my_vessel.flag # 'United States' my_vessel.flag_so # 'US' # Some vessels have photos myvessel.photos # ["//img1.fleetmon.com/thumbnails/MINNOW_1.220x146.jpg", "//img1.fleetmon.com/thumbnails/MINNOW_2.570x1140.jpg"]
Minimum list of Vessel attributes:
coords (lat, lon), course, destination, draught, etatime, flag, heading, imo, last_port, latitude, location, longitude, mmsi, name, navigationstatus, photos, positionreceived, publicurl, speed, type
Ports
my_vessel.last_port # <fleetmonger.port.Port object> port = my_vessel.last_port port.name # 'Honolulu, HI' port.duration # datetime.timedelta(...)
Port urls and Vessel urls
Pass mmsi, imo or name to vessel methods. Pass locode or name to port methods.
fm.vesselurl(name='MINNOW') fm.porturl(locode='USLAX') # Porturl also takes an optional country isocode parameter fm.porturl(name='new', country='US') # [<Newark (New York)>, <Newburgh>, <Newburyport>, <Newport (OR)>]
Weather at Location
fm.weather(lat=3.469557, lon=-167.255859) # You can also pass a vessel object to the weather call fm.weather(vessel=my_vessel)
Parameters
In general, the parameters that Fleetmonger expects match those of the Fleetmon API, with the following exceptions:
instead of mmsinumber, use mmsi ... imonumber ... imo ... q ... name
Release files for fleetmonger 0.0.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| fleetmonger-0.0.4.tar.gz | 5.8 kB | Details |
Built distributions (wheels)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| fleetmonger-0.0.4-py3-none-any.whl | Python 3 | none | any | Details |
| fleetmonger-0.0.4-py2-none-any.whl | Python 2 | none | any | Details |
Total release size: 23.9 kB
Release files / fleetmonger-0.0.4.tar.gz
| Download URL | fleetmonger-0.0.4.tar.gz |
|---|---|
| Size | 5.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
af4a9ead214eaa35c84583f50e54ce588dc3ba4f022c1f8e906ef7cd2530ccb4
|
|
BLAKE2b-256 checksum How to use checksums |
242a9971ea5061cfee0e4229009c8d999a09ce8c93f7bea173b7dc07d6b2e59c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / fleetmonger-0.0.4-py3-none-any.whl
| Download URL | fleetmonger-0.0.4-py3-none-any.whl |
|---|---|
| Size | 9.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0d48cbe9130356d9646367d5f4082b3e012d125aaa714ac42cbdf736c74fcf24
|
|
BLAKE2b-256 checksum How to use checksums |
b2c3c53293e051b3c47ba70f6ee5090281a4eb7c8b4ec6262c327031e3f13836
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / fleetmonger-0.0.4-py2-none-any.whl
| Download URL | fleetmonger-0.0.4-py2-none-any.whl |
|---|---|
| Size | 9.0 kB |
| Tags | Python 2 |
|
SHA-256 checksum How to use checksums |
fec5f5f140c07485220686cf6bb3d7fc87a4a3dd367f1a1567e4927dcc6d9fbb
|
|
BLAKE2b-256 checksum How to use checksums |
05806ef049d69f0e6b64932658110f13e2ada464542401f433a64ed2b8ffb5ce
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |