Movebank Client
Introduction
The movebank-client is an unofficial async python client to interact with Movebank's API, developed by the Gundi team of EarthRanger,.
Installation
pip install movebank-client
Usage
from movebank_client import MovebankClient
# You can use it as an async context-managed client
async with MovebankClient(
base_url="https://www.movebank.mpg.de",
username="your-user",
password="your-password",
) as client:
# Upload permissions for a study
async with aiofiles.open("permissions.csv", mode='rb') as perm_file:
await client.post_permissions(
study_name="your-study",
csv_file=perm_file
)
# Send tag data to a feed
async with aiofiles.open("data.json", mode='rb') as tag_data:
await client.post_tag_data(
feed_name="gundi/earthranger",
tag_id="your-tag-id",
json_file=tag_data
)
# Or create an instance and close the client explicitly later
client = MovebankClient()
# Send tag data to a feed
async with aiofiles.open("data.json", mode='rb') as tag_data:
await client.post_tag_data(
feed_name="gundi/earthranger",
tag_id="your-tag-id",
json_file=tag_data
)
...
await client.close() # Close the session used to send requests
Using the CLI suite
There are 3 commands to use directly, in order to test Movebank API endpoints and credentials:
get-events-for-study: Get Events for a Studyget-individual-events: Get Events for an Individualget-study: Get a Study, with option to fetch its individuals
For running the CLI suite help, run:
python cli.py --help
For running specific command help, run:
python cli.py <COMMAND_NAME> --help
All responses will be printed in the terminal as JSON or list responses.
Release files for movebank-client 1.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| movebank_client-1.3.0.tar.gz | 10.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| movebank_client-1.3.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 23.8 kB
Release files / movebank_client-1.3.0.tar.gz
| Download URL | movebank_client-1.3.0.tar.gz |
|---|---|
| Size | 10.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
cae0fd300510f29abe12e6b947d6622664ae5ad7900a5bb757646dbdcdca92a0
|
|
BLAKE2b-256 checksum How to use checksums |
6332c7ddda7c35e0ba0907ee23f59c6ddd00110a5e172696b21eb35e251bd2c3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.11.28 {"installer":{"name":"uv","version":"0.11.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / movebank_client-1.3.0-py3-none-any.whl
| Download URL | movebank_client-1.3.0-py3-none-any.whl |
|---|---|
| Size | 12.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
74ba301a3737067fb1c4e9a3cfc2e8d09670431fa39a9fc765044b325d92fb47
|
|
BLAKE2b-256 checksum How to use checksums |
d7e19df09439c13978d51b82454ee5fcaf7e64865d1cd553bb814840031db966
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.11.28 {"installer":{"name":"uv","version":"0.11.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|