Static pages client is a package that helps working with Static Pages API easier.
Project description
Static Pages Client
API Repository for Static Pages Client
📝 Installation
Install using your favourite package manager
pip install static_pages_client
📦️ Methods
Name | Type | Description |
---|---|---|
set_host | function | Set client host |
set_silent | function | Silence errors |
set_api_key | function | Set client api key |
set_authorization | function | Set client authorization token |
make_application | function | Create a static pages application |
make_application_user | function | Create a static pages application user or users |
make_application_user_token | function | Create an application user authorization token |
requester | function | Static api caller |
v1 | function | Exposes v1 caller api methods |
v2 | function | Exposes v2 caller api method |
🔧 Usage
Init Static Client
static = StaticAPI(host='domain/api/')
Create Application
static.make_application()
hash
equals to X-API-Key
header
Set Application Key
static.set_api_key(key='hash')
Create Application Users
static.make_application_user(users=[{
'email': 'someone@ebs-integrator.com',
}])
Create Application User
static.make_application_user(user={
'email': 'someone.else@ebs-integrator.com',
})
Create Application User Token
token = static.make_application_user_token(email='someone.else@ebs-integrator.com', secret='super')
Or use the settings
property in application to setup secret
and use tokens from your own main service
Set Authorization
static.set_authorization(token=token)
Make V1 Requests
static.v1(method='get', endpoint='article/')
Make V2 Requests
static.v2(method='post', endpoint='job/', data={'i18n': {'ro': {'title': 'Static'}}})
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
File details
Details for the file static-pages-client-1.0.0.tar.gz
.
File metadata
- Download URL: static-pages-client-1.0.0.tar.gz
- Upload date:
- Size: 4.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 00068f87839e28e3dffeb5053e71edc1c10f1f1dc04a8c47ce72e7ecfddf6e29 |
|
MD5 | 1aa0c7833403550135310c6ba3b20249 |
|
BLAKE2b-256 | 4922ef1d263e26d465d1b389ed09a56f6104f809c2869971f6d3d16b7de1ec8a |
File details
Details for the file static_pages_client-1.0.0-py3-none-any.whl
.
File metadata
- Download URL: static_pages_client-1.0.0-py3-none-any.whl
- Upload date:
- Size: 5.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f7fdd303d547a930f60da00cb6387becdacf65a161c2556928b94ce242504104 |
|
MD5 | 5afc3676e127f7f5da1d3e04cdd4a22a |
|
BLAKE2b-256 | 35034a562b4df77fbf657432b9921a5fac2e5fb4a55411f5555d18010f3b91d3 |