Skip to main content

Exist API client implementation

Project description

python-exist

Exist API Python Client Implementation

Requirements

Installing

Once you have satisfied the requirements listed above, install by running the following command from them terminal:

pip install exist

Quick Start

Install with pip install exist

python-exist can be used with one of three authorization types; basic, oauth, or an api_token

To use basic authorization and store the returned token, add your “username” and “password” in the following command:

exist authorize –username=<username> –password=<password>

If you already have a token, add it to the following command:

exist authorize –username=<username> –password=<password>

To use OAuth authorizations and store the returned token add your “App key” and “App secret” in the following command (Note: this requires app to registered directly with Exist):

exist authorize –client_id=<app_key> –client_secret=<app_secret>

That will save the necessary credentials for making further API calls to a file called “exist.cfg”. These credentials should be kept private. You can use same the command-line client to access everything in the Exist API (http://developer.exist.io). You can also access the same resources using the Python API:

>>> from exist import Exist
>>> exist = Exist(<client_id>, <client_secret>, <access_token>)
>>> print(exist.user())
{
    "id": 1,
    "username": "josh",
    "first_name": "Josh",
    "last_name": "Sharp",
    "bio": "I made this thing you're using.",
    "url": "http://hellocode.co/",
    "avatar": "https://exist.io/static/media/avatars/josh_2.png",
    "timezone": "Australia/Melbourne",
    "local_time": "2020-07-31T22:33:49.359+10:00",
    "private": false,
    "imperial_units": false,
    "attributes": [
        {
            "group": "steps",
            "priority": 1,
            "items": [
                {
                    "attribute": "steps",
                    "label": "Steps",
                    "value": 258,
                    "service": "Fitbit",
                    "priority": 1,
                    "private": false,
                    "value_type": 0,
                    "value_type_description": "Integer"
                },
                {
                    "attribute": "floors",
                    "label": "Floors",
                    "value": 2,
                    "service": "Fitbit",
                    "priority": 2,
                    "private": false,
                    "value_type": 0,
                    "value_type_description": "Integer"
                }
            ]
        }
    ]
}

More commands are available as per the help section of the exist command from exist --help

Roadmap

  • Tests (next)

  • Write API connectivitiy (in progress)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

exist-0.1.5.tar.gz (15.5 kB view details)

Uploaded Source

File details

Details for the file exist-0.1.5.tar.gz.

File metadata

  • Download URL: exist-0.1.5.tar.gz
  • Upload date:
  • Size: 15.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for exist-0.1.5.tar.gz
Algorithm Hash digest
SHA256 941c9a2a22ddbb8837d8aa194470ae1da4fe40a308c320ccceeb357967753c11
MD5 3c1489bb8bfd995b6d7e8a2bef4c28c9
BLAKE2b-256 d32d2c54fee7d288716e521b9a83d656880bd228a2582b7ba66496a861a50868

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page