Skip to main content

Mozilla IAM user profile ('v2') class utility.

Project description

# moz_iam_profile

This library is a dynamic class-constructor for the Mozilla IAM profiles (v2).
It takes the Mozilla IAM default profile and schema, and creates a Python class from it dynamically.

This means that the default profile (JSON file: user_profile_null.json) and schema can be changed without
affecting the class code (to some degree).

## Example usage

### Using profiles

```
from cis_profile import User
skel_user = User(user_id="bobsmith")
skel_user.user_id.value = "notbobsmith"
if skel_user.validate():
profile = skel_user.as_json()

user = { exiting...user..json }
skel_user2 = User(profile_structure_json=user)
skel_user2.fun_title.value = 'New title!'
skel_user2.sign_attribute('fun_title', 'ldap')
```

### Faking profiles

```
from cis_profile import FakeUser
user = FakeUser()
print(user.first_name.value)
# Jim
```

## About tests

`cis_crypto` must be setup and function for tests to run, see the `cis_crypto` module if is it not setup (in particular
keys must be created)

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

cis_profile-0.3.9.tar.gz (27.8 kB view details)

Uploaded Source

File details

Details for the file cis_profile-0.3.9.tar.gz.

File metadata

  • Download URL: cis_profile-0.3.9.tar.gz
  • Upload date:
  • Size: 27.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: Python-urllib/3.7

File hashes

Hashes for cis_profile-0.3.9.tar.gz
Algorithm Hash digest
SHA256 13a08f3d03f3f64e5cb78cd29c7c1594d65fb60edbf3faf079848751703c9157
MD5 a49ca911af643e33b91d6793c0eef47b
BLAKE2b-256 065818db9fdd9d4fbd7fafe7833e9cf180386a3643d3479004852ccc5368dfb3

See more details on using hashes here.

Supported by

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