A wrapper for the Glif API
Project description
GLIF client
A python client to interact with the Glif API.
Quickstart
pip install glif-client
Create a Glif account and create a new API token here.
from glif_client import GlifClient
glif_api_token = "your super secret token here"
# supply `api_token` or set it as an environment variable named GLIF_API_TOKEN
glif_api = GlifClient(api_token=glif_api_token, verbose=True)
# option 1, positional args
simple_args = ["a happy horse", "living on a farm", "in France"]
response = glif_api.run_simple("clgh1vxtu0011mo081dplq3xs", simple_args)
print(response)
# option 2, named args
named_args = {
"subject": "a happy horse",
"actionName": "living on a farm",
"location": "in France"
}
response = glif_api.run_simple("clgh1vxtu0011mo081dplq3xs", named_args)
print(response)
Enable debugging
import logging
logging.basicConfig(level=logging.DEBUG)
Links
- More API docs: https://docs.glif.app/api/getting-started
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
glif_client-0.1.1.tar.gz
(3.5 kB
view details)
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 glif_client-0.1.1.tar.gz.
File metadata
- Download URL: glif_client-0.1.1.tar.gz
- Upload date:
- Size: 3.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.9.19
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d0c1d53372cbe7d04e78fcc1cd3a1dd7a5b4b2be1046a3fbdbf966181611311c
|
|
| MD5 |
730a2c514d2a86f5d6b0a1e512e03901
|
|
| BLAKE2b-256 |
c4bdb2e79d67b0e3df1bf8ddc385c17104fcec731ecc7849cbf3da6d79a6a833
|
File details
Details for the file glif_client-0.1.1-py3-none-any.whl.
File metadata
- Download URL: glif_client-0.1.1-py3-none-any.whl
- Upload date:
- Size: 3.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.9.19
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5d57b8e8716aae6dc92ac8ef66ad3e44999e8dab837e2f5f660947c3b996e085
|
|
| MD5 |
cafccb3385b09eb1ec9623aa02fb4fb5
|
|
| BLAKE2b-256 |
3f070c776d5cc8cc48929f2732ef79789269f755da412fef9a86e3d9fa0886e5
|