Registry / analytics / datacollective

datacollective

JSON →
library0.5.1pypypi✓ verified 80d ago

Python client for the Mozilla Data Collective API. Version 0.5.1 supports Python 3.11+. Provides async and sync access to data submission, retrieval, and management endpoints. Active development under Mozilla.

pip install datacollective
INSTALL
IMPORT
SIG · DATACOLLECTIVE
D
datacollective
analyticspythonv0.5.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

DatasetSubmission
from datacollective import DatasetSubmission
from datacollective import DataCollective
create_submission_draft
from datacollective import create_submission_draft
from datacollective import DataCollective
download_dataset
from datacollective import download_dataset
from datacollective import DataCollective

Submit a measurement using the synchronous client.

import os from datacollective import DataCollective # Initialize client with API key api_key = os.environ.get('DATACOLLECTIVE_API_KEY') dc = DataCollective(api_key=api_key) # Submit a simple measurement result = dc.submit(measurement={"name": "temperature", "value": 22.5}) print(result)
Debug
Known issues
breakingVersion 0.5.0 renamed `api_token` parameter to `api_key`. Old code will raise TypeError.
fix
Use `api_key='...'` instead of `api_token='...'`.
affects: >=0.5.0
deprecatedThe `submit_batch` method is deprecated in favor of `submit_bulk` in v0.5.1.
fix
Replace `submit_batch(data)` with `submit_bulk(measurements=data)`.
affects: 0.5.x
gotchaAPI key must be set via environment variable or passed explicitly. Missing key raises `datacollective.exceptions.AuthenticationError`.
fix
Export DATACOLLECTIVE_API_KEY or pass `api_key` parameter.
affects: all
Upgrade
Version history
0.5.1latest on PyPI · released May 21, 2026
Audit
Dependencies
aiohttprequiredAsync HTTP requests
Agent activity
33 hits · last 30 days
node
30
OpenAI (training)
1
Resources
datacollective — pip install datacollective · libregistry