Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

Monica Python Client

Build Status PyPI version

Connects to the Monica API and provides an easy to use python API.

Installation

pip install monica-client

Usage example

from monica import MonicaClient

client = MonicaClient(access_token="ACCESS_TOKEN")

You can find the value for the ACCESS_TOKEN on your Monica Profile page. Create a new token and use the returned key as your access token.

me()

Get the profile of the authenticated user.

client.me()

Example:

In [4]: client.me()
Out[4]:
{'id': 14109, 'object': 'user', 'first_name': 'Peter', 'last_name': 'Pan', 'email': 'peter.pan@example.com', 'timezone': 'UTC', 'currency': {'id': 2, 'object': 'currency', 'iso': 'USD', 'name': 'US Dollar', 'symbol': '$'}, 'locale': 'en', 'is_policy_compliant': True, 'account': {'id': 13}, 'created_at': '2018-10-28T09:51:19Z', 'updated_at': '2018-10-28T14:09:17Z'}

Advanced Usage

Specifying your own Monica API server

If you happen to run your own monica API server, there is a way to specify its url:

from monica import MonicaClient

client = MonicaClient(access_token="ACCESS_TOKEN",
                      api_url="http://yourapi.com/api")

Changelog

1.0.0 - 14.05.18

added:

  • initial version released
  • feature complete with respect to node js client library

License

Licensed under the Apache License, Version 2.0. Copyright 2018 Tom Bocklisch. Copy of the license.

Metadata

Release files for monica-client 1.0.0a1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for monica-client 1.0.0a1
File Size Uploaded
monica-client-1.0.0a1.tar.gz 3.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for monica-client 1.0.0a1
File Interpreter ABI Platform
monica_client-1.0.0a1-py3-none-any.whl Python 3 none any Details

Total release size: 10.4 kB

Release files / monica-client-1.0.0a1.tar.gz

Download URL monica-client-1.0.0a1.tar.gz
Size 3.1 kB
Tags Source
SHA-256 checksum
How to use checksums
2e9ffa9c7ed67a40517428433ba14dd1de3c04752efed96c17749add147ca52c
BLAKE2b-256 checksum
How to use checksums
1a867b4ee37bb0f8c9b712c69905624630e1f7cf8e0f34c8aed49015bcdee6bf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.1 pkginfo/1.4.2 requests/2.20.0 setuptools/40.5.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.5.6

Release files / monica_client-1.0.0a1-py3-none-any.whl

Download URL monica_client-1.0.0a1-py3-none-any.whl
Size 7.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e64fa4889ec9bb206a24922179ad8ee8d0f88a540cbb91af734063262f97ff84
BLAKE2b-256 checksum
How to use checksums
f3b3e2ae1393f7c24eb7da9c6777770054530e1f6603a232aeb398c6c118094f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.1 pkginfo/1.4.2 requests/2.20.0 setuptools/40.5.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.5.6

Release history Release notifications | RSS feed

This release

1.0.0a1 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page