Library for consuming data from the Open Ships data feed from Shodan
Project description
Shodan Data: Ships
A data feed of NMEA messages from open, public ship receivers on the Internet.
OpenAPI Specification: https://ships.data.shodan.io/openapi.json
Installation
pip install shodan-data-ships
Quickstart
The library provides both synchronous and asynchronous clients to the Ships datafeed. The easiest way to get started is using the synchronous interface:
from shodan_data_ships.client import Client
client = Client("YOUR SHODAN API KEY")
for msg in client.messages():
print(msg)
Data Schema
For the latest list of properties that are available please refer to the OpenAPI documentation at:
https://ships.data.shodan.io/docs
Data models are generated from the above JSON schema and are available in the respective shodan_data_ships.model.NMEAMessage
and shodan_data_ships.model.Receiver
classes.
Asynchronous Client
The library also lets you subscribe to data using asyncio
. Simply use the shodan_data_ships.client.AsyncClient
class:
from shodan_data_ships.client import AsyncClient
async def main():
client = AsyncClient("YOUR SHODAN API KEY")
async for msg in client.messages():
print(msg)
if __name__ == '__main__':
import asyncio
asyncio.run(main())
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
Hashes for shodan_data_ships-0.1.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 63d944944549673348f5d97e288fabe6008bc27c6712b21e04fa3da66b66af59 |
|
MD5 | 0f4fbc1292629fc199d2a151669ac35f |
|
BLAKE2b-256 | f77e7264a184523fdd385523b316ed330f0a06c7eaee08e35259f4108ef1b921 |