Simple Python script to fetch data from CruiseMapper
Project description
pyCruiseMapper
Python package for retrieving data on (cruise) ships from cruisemapper.com
This is a very basic implementation, and it might stay like this, but I still wanted to share it in case anyone finds it useful. I can't promise that I will keep this package updated or that it's going to work forever as is, though.
I wanted to keep it simple, so this package has no dependencies outside the standard library. Tested on Python 3.10.6 only, but should work on any >= 3.8.
Basic Usage
from pycruisemapper import CruiseMapper
cruisemapper = CruiseMapper()
# First, retrieve basic data on all ships
# Returns a list of Ship objects
all_ships = cruisemapper.get_ships()
# Then, select the ship(s) you are interested in from that list
meinschiff1 = list(filter(lambda x: x.imo == 9783564))[0]
# You may want to retrieve additional information of a ship's current status
# Pass the Ship object into fill_ship and it will return an object with details
meinschiff1 = cruisemapper.fill_ship(meinschiff1)
# You can now access things like the current location or temperature
location = meinschiff1.location # .latitude/.longitude
temperature = meinschiff1.current_temperature # returned in °C
# Check the class definitions in /classes/*.py to see all possible attributes
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pycruisemapper-0.9.0.tar.gz.
File metadata
- Download URL: pycruisemapper-0.9.0.tar.gz
- Upload date:
- Size: 11.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8a481adf268ff0d540b7d49ffe094960495baf9fd8c012b6c25e5d1e976d1e8e
|
|
| MD5 |
66e410d7ae760eea6b904cbfe4171e21
|
|
| BLAKE2b-256 |
ccd6c0901394a80dd683f4346883e18274026f90d369a4b1693f7e844ee5a7c9
|
File details
Details for the file pycruisemapper-0.9.0-py3-none-any.whl.
File metadata
- Download URL: pycruisemapper-0.9.0-py3-none-any.whl
- Upload date:
- Size: 9.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1e3377e3f734989cab69be9feafa5fd3416c0a32c122b92bc419b5968284ee3a
|
|
| MD5 |
03e1cce6703969177ae5afe74269b8c5
|
|
| BLAKE2b-256 |
58d0f6fbd7b55595d9be8de4b8e837086b512c78875ed3541b81382dd9646b1d
|