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.
Metadata
Release files for ucam-identitylib 1.0.13
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| ucam-identitylib-1.0.13.tar.gz | 327.8 kB | Without provenance | Details for ucam-identitylib-1.0.13.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| ucam_identitylib-1.0.13-py3-none-any.whl | Python 3 | none | any | Details for ucam_identitylib-1.0.13-py3-none-any.whl |
Total release size: 1.1 MB
Release files / ucam-identitylib-1.0.13.tar.gz
| Download URL | ucam-identitylib-1.0.13.tar.gz |
|---|---|
| Size | 327.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a9564424bff0816c0821d97c8a825e3bf82e8e01d542e0a6c37d79b7a1a652f8
|
|
BLAKE2b-256 checksum How to use checksums |
5389ea96677ad476dbeff294195b71d7eef7edecc8f0df3235cf17d4b14e0621
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.10.7
|
Release files / ucam_identitylib-1.0.13-py3-none-any.whl
| Download URL | ucam_identitylib-1.0.13-py3-none-any.whl |
|---|---|
| Size | 784.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3825b3f43ec035ff89d21a0bf1efed2d84ca5aab1616eb3ad8fec33a9144d950
|
|
BLAKE2b-256 checksum How to use checksums |
c0daeb0446e3b5bc914e42a21f70ff6c393d2c3260ec24bcef46038a62c20420
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.10.7
|
Security for ucam-identitylib 1.0.13
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.