1
0
mirror of https://github.com/peeringdb/peeringdb.git synced 2024-05-11 05:55:09 +00:00
Files
peeringdb-peeringdb/docs/dev/modules/util.py.md

47 lines
890 B
Markdown
Raw Normal View History

Generated from util.py on 2021-11-02 10:01:21.611533
# peeringdb_server.util
Assorted utility functions for peeringdb site templates.
# Functions
---
## coerce_ipaddr
`def coerce_ipaddr(value)`
ipaddresses can have multiple formats that are equivalent.
This function will standardize a ipaddress string.
Note: this function is not a validator. If it errors
It will return the original string.
---
# Classes
---
## APIPermissionsApplicator
```
APIPermissionsApplicator(grainy.core.NamespaceKeyApplicator)
```
Applicator that looks for permission namespaces from
a specified field in the dict it is scanning
### Instanced Attributes
These attributes / properties will be available on instances of the class
- is_generating_api_cache (`@property`): None
### Methods
#### \__init__
`def __init__(self, user)`
Initialize self. See help(type(self)) for accurate signature.
---