Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

mobility-db-api

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mobility-db-api

A Python client for the Mobility Database API

  • 0.5.0
  • PyPI
  • Socket score

Maintainers
1

Mobility Database API Client

PyPI version Tests codecov License: MIT Documentation

A Python client for downloading GTFS files through the Mobility Database API.

Features

  • Search for GTFS providers by country, name or id
  • Download GTFS datasets from hosted or direct sources
  • Track dataset metadata and changes
  • Thread-safe and process-safe operations
  • Automatic token refresh and error handling

Installation

pip install mobility-db-api

Quick Example

from mobility_db_api import MobilityAPI

# Initialize client (uses MOBILITY_API_REFRESH_TOKEN env var)
api = MobilityAPI()

# Search for providers in Belgium
providers = api.get_providers_by_country("BE")
print(f"Found {len(providers)} providers")

# Download a dataset
if providers:
    dataset_path = api.download_latest_dataset(providers[0]['id'])
    print(f"Dataset downloaded to: {dataset_path}")

Documentation

Full documentation is available at bdamokos.github.io/mobility-db-api, including:

Development

# Clone repository
git clone https://github.com/bdamokos/mobility-db-api.git
cd mobility-db-api

# Install in development mode
pip install -e ".[dev]"

# Run tests
pytest

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

Keywords

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc