Heiko is a frontend for MaaS
Project description
Heiko
Heiko is a frontend for MaaS and a MVP client to be run in K4CG
Install
Heiko is a pypi package that you can install via pip
pip install heiko
For install from local git repository via git
pip install .
For development, we need some extra packages, maintined in the target "dev"
pip install .[dev]
Run
heiko
Development:
swagger-client
MaaS (Matomat as a Service) API definition
This Python package is automatically generated by the Swagger Codegen project:
- API version: 0.5.2
- Package version: 1.0.0
- Build package: io.swagger.codegen.languages.PythonClientCodegen
Requirements.
Python 3.4+
Installation & Usage
pip install
If the python package is hosted on Github, you can install directly from Github
pip install git+https://github.com/k4cg/heiko.git
(you may need to run pip
with root permission:
sudo pip install git+https://github.com/k4cg/heiko.git
)
Then import the package:
import swagger_client
Setuptools
Install via Setuptools.
python setup.py install --user
(or sudo python setup.py install
to install the package for all users)
Then import the package:
import swagger_client
Getting Started
Please follow the installation procedure and then run the following:
from __future__ import print_function
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = swagger_client.AuthApi()
username = 'username_example' # str |
password = 'password_example' # str |
validityseconds = 56 # int | (optional)
try:
# Logs a user in and returns an JWT token for authentication
api_response = api_instance.auth_login_post(username, password, validityseconds=validityseconds)
pprint(api_response)
except ApiException as e:
print("Exception when calling AuthApi->auth_login_post: %s\n" % e)
Documentation for API Endpoints
All URIs are relative to https://localhost:8443/v0
Class Method HTTP request Description
AuthApi [auth_login_pos t <docs/AuthApi POST Logs a user in .md#auth_login_ /auth/login and returns an post>]{.title-ref}__ JWT token for authentication
ItemsApi [items_get <doc s/ItemsApi.md#i GET /items List all tems_get>]{.title-ref}__ available items
ItemsApi [items_item_id_ consume_patch PATCH Consumes a Item
< docs/ItemsApi.m /items/{itemId}
d#items_item_id /consume
_consume_patch>
]{.title-ref}__
ItemsApi [items_item_id_ delete DELETE Delete Item
<docs/It emsApi.md#items /items/{itemId}
_item_id_delete
>]{.title-ref}__
ItemsApi [items_item_id_ get GET Get a certain <docs/Items Api.md#items_it /items/{itemId} Item em_id_get>]{.title-ref}__
ItemsApi [items_item_id_ patch PATCH Update Item
<docs/Ite msApi.md#items_ /items/{itemId}
item_id_patch>]{.title-ref}
__
ItemsApi [items_item_id_ stats_get GET Get consumption
<docs /ItemsApi.md#it /items/{itemId} stats
ems_item_id_sta /stats
ts_get>]{.title-ref}__
ItemsApi [items_post <do cs/ItemsApi.md# POST /items Add a new item items_post>]{.title-ref}__
ItemsApi [items_stats_ge t <docs/ItemsAp GET Get consumption i.md#items_stat /items/stats stats of all s_get>]{.title-ref}__ items
ServiceApi [service_stats_ get <docs/Servi GET Total service ceApi.md#servic /service/stats stats e_stats_get>]{.title-ref}__
UsersApi [users_get <doc s/UsersApi.md#u GET /users List all users sers_get>]{.title-ref}__
UsersApi [users_post <do cs/UsersApi.md# POST /users Add a new user users_post>]{.title-ref}__
UsersApi [users_user_id_ PATCH Add users credits
credits_add_pat ch <docs/UsersA /users/{userId}
pi.md#users_use /credits/add
r_id_credits_ad
d_patch>]{.title-ref}__
UsersApi [users_user_id_ PATCH Transfer credits
credits_transfe r_patch <docs/U /users/{userId}
sersApi.md#user /credits/transf
s_user_id_credi er
ts_transfer_pat
ch>]{.title-ref}__
UsersApi [users_user_id_ PATCH Widthdraw users
credits_withdra w_patch <docs/U /users/{userId} credits
sersApi.md#user /credits/withdr
s_user_id_credi aw
ts_withdraw_pat
ch>]{.title-ref}__
UsersApi [users_user_id_ delete DELETE Delete user
<docs/Us ersApi.md#users /users/{userId}
_user_id_delete
>]{.title-ref}__
UsersApi [users_user_id_ get GET Get user by user <docs/Users Api.md#users_us /users/{userId} ID er_id_get>]{.title-ref}__
UsersApi [users_user_id_ password_patch PATCH Change password
<docs/UsersApi. /users/{userId} for currently
md#users_user_i /password logged in user.
d_password_patc
h>]{.title-ref}__
UsersApi [users_user_id_ PATCH Set password for
resetpassword_p atch <docs/User /users/{userId} user ID
sApi.md#users_u /resetpassword
ser_id_resetpas
sword_patch>]{.title-ref}__
UsersApi [users_user_id_ stats_get GET Get matomat stats
<docs /UsersApi.md#us /users/{userId} for user
ers_user_id_sta /stats
ts_get>]{.title-ref}__
Documentation For Models
- AuthSuccess
- Error
- Item
- ItemStats
- ServiceStats
- ServiceStatsItems
- ServiceStatsItemsCost
- ServiceStatsUsers
- ServiceStatsUsersCredits
- TransferredCredits
- User
- UserStats
Documentation For Authorization
jwtTokenAuth
- Type: API key
- API key parameter name: Authorization
- Location: HTTP header
Author
@noqqe
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 heiko-4.1.0.tar.gz
.
File metadata
- Download URL: heiko-4.1.0.tar.gz
- Upload date:
- Size: 39.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | cee3f16b4073fa0d9310b5fa91b557ef5223c49360d5e7352d7436d95cbf1555 |
|
MD5 | 0e0db018d1974f5819d60e74f36c1b20 |
|
BLAKE2b-256 | a2bf3bc9daf36626b46e0f654f63264a326049e65a9a84489999b9f452211cf2 |
File details
Details for the file heiko-4.1.0-py2-none-any.whl
.
File metadata
- Download URL: heiko-4.1.0-py2-none-any.whl
- Upload date:
- Size: 65.7 kB
- Tags: Python 2
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 684481a8037d73b8684366b47e3320412dc144c558810850eb7bdfd6f1bbf4dd |
|
MD5 | b684e241b19d50fb11c58a4b109dc12f |
|
BLAKE2b-256 | 535cf2f2f969b8ff823b73d453918b71571f43f50134f322d3d8219f0209c528 |