Skip to content

Chancery is a module for creating various represantations of a user.

License

Notifications You must be signed in to change notification settings

smaragden/chancery

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Chancery

Chancery is a module for creating various representations of a user.

Usage

from chancery import Catalog
catalog = Catalog(domain="example.com")
user = catalog.register("Fredrik Brännbacka")

The resulting user variable will be a User object with the following properties:

  • user.name == "Fredrik Brännbacka"
  • user.short_name == "frbr"
  • user.ascii_name == "Fredrik Brannbacka"
  • user.initials == "fb"
  • user.login == "fredrik.brannbacka"
  • user.email == "fredrik.brannbacka@example.com"
  • user.id == "f800499b-9128-522d-a7f5-b1f3610354e2"

And user.as_json() will result in:

{
  "name": "Fredrik Br\u00e4nnbacka", 
  "short_name": "frbr", 
  "email": "fredrik.brannbacka@example.com", 
  "ascii_name": "Fredrik Brannbacka", 
  "login": "fredrik.brannbacka", 
  "id": "f800499b-9128-522d-a7f5-b1f3610354e2", 
  "initials": "fb"
}

About

Chancery is a module for creating various represantations of a user.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages