[](http://travis-ci.org/balanced/frl) [](https://pypi.python.org/pypi/frl/) [](https://pypi.python.org/pypi/frl/) [](https://pypi.python.org/pypi/frl/) [](https://pypi.python.org/pypi/frl/)
A request logger for requests and responses from the requests and flask libraries that logs in a standard format
```json
{
"meta":{
},
"request":{
"headers":[
[
"Host",
"localhost"
],
[
"Content-Length",
"0"
],
[
"Content-Type",
""
]
],
"url":"http://localhost/",
"method":"GET",
"payload": null
},
"response":{
"status":"200 OK",
"headers":[
[
"Content-Type",
"text/html; charset=utf-8"
],
[
"Content-Length",
"12"
]
],
"data":"Hello World!"
}
}
```
## Configure flask
```python
class FlaskApp(flask.Flask):
def log_it(self, response):
logger.log(response)
return response
logger = frl.server.ServerRequestLogger(
'logger-name',
['card_number', 'password']
)
app = FlaskApp(__name__)
app.after_request(app.log_it)
```
## Configure requests
```python
logger = frl.client.ClientRequestLogger(
'logger-name',
['card_number', 'password']
)
response = requests.get('http://google.com')
logger.log(response)
```
You can add additional data into the meta field.
```python
logger = frl.client.ClientRequestLogger(
'logger-name',
['card_number', 'password']
)
def meta_logger(response):
return {'foo': 'bar'}
logger.meta_population_methods.append(meta_logger)
```
Metadata
Release files for frl 0.0.4
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 | Actions |
|---|---|---|---|---|
| frl-0.0.4.tar.gz | 4.9 kB | Without provenance | Details for frl-0.0.4.tar.gz |
Release files / frl-0.0.4.tar.gz
| Download URL | frl-0.0.4.tar.gz |
|---|---|
| Size | 4.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a59ac3e947d33a84daf92b254bda1f91f2ff0fd1287cc8a8132938ab9bb8e1cf
|
|
BLAKE2b-256 checksum How to use checksums |
0fde5b9aa04356864d07e08bf2a4fb174f1ddfcea58afe32acecb03199298b05
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for frl 0.0.4
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.