Migas Python client
Project description
Migas Client
A Python package to communicate with a migas server.
About
migas (mee-gahs) is a Python client to facilitate communication with a migas server.
Usage
To start communicating with a migas server, the client must first be setup.
import migas; migas.setup()
By default, migas-py will communicate with the official hosted migas server.
However it can easily be configured to communicate with any hosted migas server.
import migas; migas.setup(endpoint='your-endpoint')
setup() will populate the interal configuration, which is done at the process level.
API
migas includes the following functions to communicate with the telemetry server:
migas.add_project()
Send a breadcrumb with usage information to the server. Usage information includes:
- application
- application version
- application status
The server will attempt to return version information about the project.
add_project example
>>> add_project('mgxd/migas-py', '0.0.1')
{'bad_versions': [],
'cached': True,
'latest_version': '0.0.4',
'message': '',
'success': True}
migas.get_usage()
Check number of uses a project has received from a start date, and optionally an end date.
If no end date is specified, the current datetime is used.
get_usage example
>>> get_usage('mgxd/migas-py', '2022-07-01')
{'hits': 7, 'message': '', 'unique': False, 'success': True}
User Control
migas can controlled by the following environmental variables:
| Envvar | Description | Value | Default |
|---|---|---|---|
| MIGAS_OPTOUT | Disable telemetry collection | Any | None |
| MIGAS_TIMEOUT | Seconds to wait for server response | Number >= 0 | 5 |
| MIGAS_LOG_LEVEL | Logger level | Logging levels | WARNING |
Configuration
The internal configuration stores the following telemetry information:
- language and language version
- operating system
- run within a container
- run from continuous integration
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file migas-0.2.0.tar.gz.
File metadata
- Download URL: migas-0.2.0.tar.gz
- Upload date:
- Size: 32.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ac9846d14dfdd35bf92a0dc802074330ca86f00dcd7f0a021366ce279b8ddd57
|
|
| MD5 |
dc2236bcce3a5fe28b9b65a6cdfdc62d
|
|
| BLAKE2b-256 |
c69314935570dd9980ea5e45d3d5abe8e258da697a1bb89984336128123bede0
|
File details
Details for the file migas-0.2.0-py3-none-any.whl.
File metadata
- Download URL: migas-0.2.0-py3-none-any.whl
- Upload date:
- Size: 16.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2ac9ff90b9eb238423edaf5c1479a9c514cfbfe7038619569f981dda48f0724e
|
|
| MD5 |
929c47cd2cca9978ab2ee4c133d66ea4
|
|
| BLAKE2b-256 |
b1d47983909e5fc8ed78b2205863c43f502d7c93de68f0ab1f9fee1a7fcff495
|