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.1
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.1.tar.gz | 10.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| movebank_client-1.3.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 23.8 kB
Release files / movebank_client-1.3.1.tar.gz
| Download URL | movebank_client-1.3.1.tar.gz |
|---|---|
| Size | 10.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a99de8f6a8b9e5e23d987bf19f89327048e126725a20286439b6d77bf0ae7be0
|
|
BLAKE2b-256 checksum How to use checksums |
7cf5eeb101d4e41d70cb2401a073f9693938a4f59e24720f0468ccd34b06a749
|
| 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.1-py3-none-any.whl
| Download URL | movebank_client-1.3.1-py3-none-any.whl |
|---|---|
| Size | 12.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6b8ef429079b714913cb41ea1436e7bf9f9585fdac413937e768cd1296bead2e
|
|
BLAKE2b-256 checksum How to use checksums |
05ca79d0d49791d3fa6fc637237297b7ef012fc8e0e73e9e0ec2d2868b440f57
|
| 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}
|