python-statuspageio
StatusPage.oi API V1 library client for Python. Based on the documentaion from https://doers.statuspage.io/api/v1/
Provides most of the funcitonality for the http://statuspage.io api's via handy python code.
Installation
Statuspageio package can be installed either via pip:
.. code:: bash
$ pip install --upgrade statuspageio
You can install from the source code as well. First clone the repo and then execute:
.. code:: bash
$ python setup.py install
After installing, import statuspageio package:
.. code:: python
import statuspageio
Usage
.. code:: python
import statuspageio
# Then we instantiate a client (as shown below)
Build a client
**Using this api without authentication gives an error**
.. code:: python
client = statuspageio.Client(api_key='<YOUR_PERSONAL_API_KEY>', page_id=<YOUR_PERSONAL_PAGE_ID')
or
.. code:: python
client = statuspageio.Client(api_key='<YOUR_PERSONAL_API_KEY>', page_id=<YOUR_PERSONAL_PAGE_ID',organization_id=<YOUR_PERSONAL_ORGANIZATION_ID)
Client Options
The following options are available while instantiating a client:
- api_key: Personal API Key
- page_id: Personal page id
- organization_id: Personal organization id, used for managing users.
- base_url: Base url for the api
- user_agent: Default user-agent for all requests
- timeout: Request timeout
- verbose: Verbose/debug mode
Architecture
The library follows few architectural principles you should understand
before digging deeper. 1. Interactions with resources are done via
service objects. 2. Service objects are exposed as properties on client
instances. 3. Service objects expose resource-oriented actions. 4.
Actions return dictionaries that support attribute-style access, a la
JavaScript (thanks to Bunch and it's form Munch).
For example, to interact with components API you will use
``statuspageio.ComponentsService``, which you can get if you call:
.. code:: python
client = statuspageio.Client(api_key='<YOUR_PERSONAL_API_KEY>', page_id=<YOUR_PERSONAL_PAGE_ID')
client.components # statuspageio.ComponentsService
To retrieve list of resources and use filtering you will call ``#list``
method:
.. code:: python
client = statuspageio.Client(api_key='<YOUR_PERSONAL_API_KEY>', page_id=<YOUR_PERSONAL_PAGE_ID')
client.components.list() # list(dict|Munch)
Resources and actions
---------------------
Documentation for every action can be found in ``statuspageio/services.py``
file.
Tests
-----
Sorry. These need to be written.
Thanks
------
Thank you to the BaseCRM development team who created the majority of the code for this project.
We forked the code as the aritectural style worked really well for this project.
Please see https://github.com/basecrm/basecrm-python for more details
Thank you so much!
License
-------
MIT
Bug Reports
-----------
Report `here <https://github.com/vukomir/python-statuspageio/issues>`__.
Metadata
Release files for vukomir-statuspageio 0.0.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| vukomir-statuspageio-0.0.4.tar.gz | 11.3 kB | Without provenance | Details for vukomir-statuspageio-0.0.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| vukomir_statuspageio-0.0.4-py3-none-any.whl | Python 3 | none | any | Details for vukomir_statuspageio-0.0.4-py3-none-any.whl |
Total release size: 23.9 kB
Release files / vukomir-statuspageio-0.0.4.tar.gz
| Download URL | vukomir-statuspageio-0.0.4.tar.gz |
|---|---|
| Size | 11.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
bef6ed747ae7f49453ef76ca9bfe27523236d50bed9a75b63a46924bfeae4d59
|
|
BLAKE2b-256 checksum How to use checksums |
82e98a5455f559e9b767533b9e28398661a025f707388a9296731b9109955b38
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.3.0 pkginfo/1.7.0 requests/2.22.0 setuptools/54.0.0 requests-toolbelt/0.9.1 tqdm/4.58.0 CPython/3.8.5
|
Release files / vukomir_statuspageio-0.0.4-py3-none-any.whl
| Download URL | vukomir_statuspageio-0.0.4-py3-none-any.whl |
|---|---|
| Size | 12.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0e1856c24ceb5c6b17afede62be23b392f0499f0a9e8cadcdc62d7b9147b7525
|
|
BLAKE2b-256 checksum How to use checksums |
d6d5a3840b1e380134ae931130913dce56846dec31b28cc4a3f111089914806d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.3.0 pkginfo/1.7.0 requests/2.22.0 setuptools/54.0.0 requests-toolbelt/0.9.1 tqdm/4.58.0 CPython/3.8.5
|
Security for vukomir-statuspageio 0.0.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.