Skip to main content

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

Documentation For Authorization

jwtTokenAuth

  • Type: API key
  • API key parameter name: Authorization
  • Location: HTTP header

Author

@noqqe

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

heiko-4.2.0.tar.gz (39.3 kB view hashes)

Uploaded Source

Built Distribution

heiko-4.2.0-py2-none-any.whl (65.7 kB view hashes)

Uploaded Python 2

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page