This commit is contained in:
Nadja Reitzenstein 2022-04-28 17:55:41 +02:00
parent e6c6b530c8
commit afd5fac0aa
6 changed files with 55 additions and 4 deletions

18
Pipfile Normal file
View File

@ -0,0 +1,18 @@
[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"
[packages]
pkgconfig = "*"
pytest = "*"
sphinx-multiversion = "*"
tox = "*"
Jinja2 = "*"
Cython = "*"
Sphinx = "*"
[dev-packages]
[requires]
python_version = "3.10"

14
README.md Normal file
View File

@ -0,0 +1,14 @@
# FabAccess for Python
Small library to give access to the FabAccess API for administration and development
## Setup
Clone this repo with the option `--recursive` for submodules or run `git submodule update --init` if you did not
clone recursively.
Installing dependencies using pipenv:
```shell
$ pipenv
```

7
fabapi/api.py Normal file
View File

@ -0,0 +1,7 @@
import os
import capnp
path = os.path.dirname(os.path.abspath(__file__))
connection_capnp = capnp.load(path + '/schema/connection.capnp')
authenticationsystem = capnp.load(path + '/schema/authenticationsystem.capnp')

View File

@ -2,9 +2,9 @@ import asyncio
import socket
import ssl
import capnp
connection_capnp = capnp.load('schema/connection.capnp')
authenticationsystem_capnp = capnp.load('schema/authenticationsystem.capnp')
from fabapi import api
connection_capnp = api.connection_capnp
authenticationsystem_capnp = api.authenticationsystem
async def myreader(client, reader):
while True:

12
fabapi/user_system.py Normal file
View File

@ -0,0 +1,12 @@
class UserSystem:
"""
Higher-level API for managing users
"""
api_usersystem = None
def __init__(self, usersystem):
self.api_usersystem = usersystem

@ -1 +1 @@
Subproject commit 5dade41aebcee627ef65e4f3471d7568dcd7a5e2
Subproject commit d49f4a9813ac9c3100f63b11d4dc47ceb3397b75