A wrapper for Lifter API.
Project description
Lifter API Wrapper
This is a wrapper for making calls to Lifter API.
Getting Started
You can install this package using pip
or your favourite package manager, e.g. pipenv
, poetry
.
pip install lifter-api-wrapper
# example using pipenv
pipenv install lifter-api-wrapper
You will also need an API key to have complete functionality. I suggest storing this as a .env
file, and remember to add this to your .gitignore
so you don't share this to a public repository by accident.
# .env
API_TOKEN=KeyGoesHere
If you use pipenv
, then the key is loaded as a environment variable API_TOKEN
automatically. Otherwise you might have to use a library like dotenv
.
You can simple create an object like so:
from lifter_api import LifterAPI
import os
lifter_api = LifterAPI(auth_token=os.getenv("API_TOKEN"))
# this will use default version, v1
# you can specify the version
lifter_api_version1 = LifterAPI(version="v1", auth_token=os.getenv("API_TOKEN"))
Documentation
Comprehensive documentation can be found here.
For Local Development
For local development, you will need to clone the API from here.
You will need to set a environment variable, LOCAL_DEVELOPMENT=1
and it's a good idea to put this in the .env
file. This will ensure the locally hosted API will be used and not the live API.
The default URL for the locally hosted API is http://localhost:8000
. Alternatively, you can define the url to your liking: LifterAPI(url="http://localhost:8001")
.
git clone https://github.com/WeightliftingNZ/lifter-api
cd lifter-api
make run
This will run a server and allow you to run tests for this wrapper.
Contribution
Please checkout CONTRIBUTING.md if you interested in contributing.
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
Hashes for lifter_api_wrapper-0.3.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8409262e13047815dceab4719c2b198017d592c606bbfdcb78c7eb9026c64439 |
|
MD5 | 4c3aec69cc60f6648e9bb3544d5214b8 |
|
BLAKE2b-256 | ccd92fb3264d544e5fd6964b8b7fe0a14e93fd612c9364a168b947f7274b39e6 |