Skip to main content

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

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


Download files

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

Source Distribution

ucam-identitylib-1.0.8.tar.gz (260.5 kB view details)

Uploaded Source

Built Distribution

ucam_identitylib-1.0.8-py3-none-any.whl (608.7 kB view details)

Uploaded Python 3

File details

Details for the file ucam-identitylib-1.0.8.tar.gz.

File metadata

  • Download URL: ucam-identitylib-1.0.8.tar.gz
  • Upload date:
  • Size: 260.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.6

File hashes

Hashes for ucam-identitylib-1.0.8.tar.gz
Algorithm Hash digest
SHA256 c8188ac9f7b5c9a41a64028b8a176bd3540cb4aa4a43e9bb79640e5c3edb369f
MD5 fc0550bbacc3e701a2f2b21d151d9ff3
BLAKE2b-256 7429037cf9d45b2d7184b0563fc019c3d6907cbfad4861bab96e706514b15a7f

See more details on using hashes here.

File details

Details for the file ucam_identitylib-1.0.8-py3-none-any.whl.

File metadata

File hashes

Hashes for ucam_identitylib-1.0.8-py3-none-any.whl
Algorithm Hash digest
SHA256 eccbb3ab0b730345f2933d6e1d967551243c9729e2ca6ecfacd3ec26f695099d
MD5 1bb53b97e3e78da4fcead085a49e5bfa
BLAKE2b-256 081173ae9b67cf5bac799c0258aac5272e1853d6beb159532397dfc63b2bc34d

See more details on using hashes here.

Supported by

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