Skip to main content

Transport.data.gouv.fr mapping to Udata

Project description

udata-transport

This plugin acts as a bridge between udata and transport.data.gouv.fr system.

Compatibility

udata-transport requires Python 3.7+ and udata.

Installation

Install udata.

Remain in the same virtual environment (for Python).

Install udata-transport:

pip install udata-transport

Modify your local configuration file of udata (typically, udata.cfg) as following:

PLUGINS = ['transport']
TRANSPORT_DATASETS_URL = 'https://path/to/transport.data.gouv.fr/datasets/api'
  • TRANSPORT_DATASETS_URL: The URL of the API endpoint listing datasets on transport.data.gouv.fr. Default: https://transport.data.gouv.fr/api/datasets

Usage

Mapping dataset

The mapping is done by a job, runnable by hand or scheduled. The job is idempotent, previous URLs are cleaned before mapping new ones.

udata job run map-transport-datasets

This plugin will store the mapping URL in the dataset extras transport:url key:

{
"id": "dataset-id",
"extras": {
    "transport:url": "https://path/to/datasets"
  }
}

Changelog

Current (in progress)

  • Migrate to Python 3.11 following udata dependencies upgrade #4

1.0.1 (2024-02-15)

  • Replace mongo legacy image in CI #2
  • Clear datasets only after successful request #3

1.0.0 (2022-03-31)

  • Initial version of udata-transport #1

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

udata_transport-1.0.2.dev51-py3-none-any.whl (6.4 kB view details)

Uploaded Python 3

File details

Details for the file udata_transport-1.0.2.dev51-py3-none-any.whl.

File metadata

  • Download URL: udata_transport-1.0.2.dev51-py3-none-any.whl
  • Upload date:
  • Size: 6.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.10.0 requests/2.24.0 setuptools/66.1.1 requests-toolbelt/1.0.0 tqdm/4.66.2 CPython/3.7.6

File hashes

Hashes for udata_transport-1.0.2.dev51-py3-none-any.whl
Algorithm Hash digest
SHA256 25e832abac8123e2303d720a3b923ad4e4e9b53ebad8b3a8f3a3485c53361b16
MD5 d60a619b6d89cb711df7f5b597439687
BLAKE2b-256 fcf1ea93db106ded48e0f8283ca2bba5b7ba06552ea0dcac01d02b40332eb706

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page