tomb_reflect
Intro
Easily make your Pyramid-powered Web API introspectable.
All it takes is:
config.include('tomb_reflect', route_prefix='/api_info')
# You could pass options to tomb_reflect_add_views to add auth, etc.
config.tomb_reflect_add_views()
With this, your app now responds to 2 new URLs.
The first URL, /api_info/routes, returns a list of routes:
{
"hello": {
"route_pattern": "/hello"
},
"hello_name": {
"route_pattern": "/hello_name/{name}"
},
"tomb_reflect.routes#index": {
"route_pattern": "api_info/routes"
},
"tomb_reflect.routes#show": {
"route_pattern": "api_info/routes/{route_name}"
}
}
The second URL, /api_info/routes/{route_name}, returns detailed info for a specific route:
{
"route_name": "hello",
"route_pattern": "/hello",
"view": "inventorysvc.views.hello.hello"
}
Configuration
If you want the URLs to be under a different root path, change the route_prefix in your config.include call:
config.include('tomb_reflect', route_prefix='/super/secret/place')
If you want the URLs to only be visible with certain permissions, require special authorization, etc., you can pass options to config.tomb_reflect_add_views:
# You can pass options to tomb_reflect_add_views to add auth, etc.
config.tomb_reflect_add_views(
decorator=SomeCustomDecorator,
permission='reflect')
Similar
pyramid-describe - Only works for apps that use pyramid-controller dispatch though
Metadata
Release files for tomb_reflect 0.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| tomb_reflect-0.0.1.tar.gz | 4.9 kB | Without provenance | Details |
Release files / tomb_reflect-0.0.1.tar.gz
| Download URL | tomb_reflect-0.0.1.tar.gz |
|---|---|
| Size | 4.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
829bb8e1accd078618c1c42917c59c607ad379fad75acc406ea35d137efb04bf
|
|
BLAKE2b-256 checksum How to use checksums |
ee02cb46ceeb2f5fd333ca61cd2059a7096baf3618a87c75c1eb17808eed6689
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for tomb_reflect 0.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.