Skip to main content

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.

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)

Source distribution for ucam-identitylib 1.0.13
File Size Uploaded
ucam-identitylib-1.0.13.tar.gz 327.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for ucam-identitylib 1.0.13
File Interpreter ABI Platform
ucam_identitylib-1.0.13-py3-none-any.whl Python 3 none any Details

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

Release history Release notifications | RSS feed

3.4.1

2 release files

3.4.0

2 release files

3.3.2

2 release files

3.3.1

2 release files

3.3.0

2 release files

3.2.0

2 release files

3.1.2

2 release files

3.1.1

2 release files

3.1.0

2 release files

3.0.0

2 release files

2.0.2

2 release files

2.0.1

2 release files

2.0.0

2 release files

1.6.0

2 release files

1.5.0

2 release files

1.4.0

2 release files

1.3.0

2 release files

1.2.0

2 release files

1.1.0

2 release files

1.0.18

2 release files

1.0.16

2 release files

1.0.15

2 release files

1.0.14

2 release files

This release

1.0.13 This release

2 release files

1.0.12

2 release files

1.0.10

2 release files

1.0.9

2 release files

1.0.8

2 release files

1.0.7

2 release files

1.0.6

2 release files

1.0.5

2 release files

1.0.4

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

0.1.7

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.0.5

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page