A module containing helpers and shared code related to identity systems within UIS, University of Cambridge.
Project description
Identity Lib
This Python package contains shared code related to Identity systems within UIS. It's primary purpose is to encourage code-reuse and to allow for client systems to make use of the same data structures and logic that is contained within our emergent identity APIs.
Use
Install ucam-identitylib using pip:
pip install ucam-identitylib
The module can then be used as identitylib:
from identitylib.identifiers import Identifier
identifier = Identifier.from_string('wgd23@v1.person.identifiers.cam.ac.uk')
print(identifier)
Developer quickstart
This project contains a dockerized testing environment which wraps tox.
Tests can be run using the ./test.sh command:
# Run all PyTest tests and Flake8 checks
$ ./test.sh
# Run PyTest and Flake8 and recreate test environments
$ ./test.sh --recreate
# Run just PyTest
$ ./test.sh -e py3
# Run a single test file within PyTest
$ ./test.sh -e py3 -- tests/test_identifiers.py
# Run a single test file within PyTest with verbose logging
$ ./test.sh -e py3 -- tests/test_identifiers.py -vvv
Pulling latest specs from source repositories
Local copies of the OpenAPI specs used to generate the library should be pulled in to this repo so the specific specs used in each build are under revision control. This can be done using the provided script:
$ ./pull-specs.sh
# If an access token required for https clones from gitlab repositories
# then this can be specified using:
$ ./pull-specs.sh --token "ACCESS_TOKEN_HERE"
Generating the identitylib
The identitylib is generated during the docker build process. To create a local copy of the identitylib distribution use the build script:
$ ./build-local.sh
This will create a new folder /dist in the current directory with the wheel and tar package for
identitylib.
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ucam-identitylib-1.0.13.tar.gz.
File metadata
- Download URL: ucam-identitylib-1.0.13.tar.gz
- Upload date:
- Size: 327.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a9564424bff0816c0821d97c8a825e3bf82e8e01d542e0a6c37d79b7a1a652f8
|
|
| MD5 |
52a08590d98e4b7fae43eeeaf66a446c
|
|
| BLAKE2b-256 |
5389ea96677ad476dbeff294195b71d7eef7edecc8f0df3235cf17d4b14e0621
|
File details
Details for the file ucam_identitylib-1.0.13-py3-none-any.whl.
File metadata
- Download URL: ucam_identitylib-1.0.13-py3-none-any.whl
- Upload date:
- Size: 784.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3825b3f43ec035ff89d21a0bf1efed2d84ca5aab1616eb3ad8fec33a9144d950
|
|
| MD5 |
ddee8b6a216dec9bb44bbfc80cb3d878
|
|
| BLAKE2b-256 |
c0daeb0446e3b5bc914e42a21f70ff6c393d2c3260ec24bcef46038a62c20420
|