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
Close
Hashes for static-pages-client-0.0.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | a8dd7066e477e840dfb172c905947260e43dfe2a5422123288f2044aa24177d8 |
|
MD5 | e9e15789de4dc9ed8d089f6210f1a9f7 |
|
BLAKE2b-256 | 104b9bd707e798876064c9259f7b7afe0a8237a5e4e96035215e0087674f6753 |
Close
Hashes for static_pages_client-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 871d48121b39c84b278952ed98c93c33de3c415fed793cb240aad6777e7b58c1 |
|
MD5 | ed36cd9ed8b9af82db6c4e194d05729a |
|
BLAKE2b-256 | 37f6a004989ad4355279c358853eb0dec56f899ecaff883e3467aa4e4e29735f |