{"id":22560108,"url":"https://github.com/tniah/flask-audit-log","last_synced_at":"2026-04-27T12:04:10.669Z","repository":{"id":235746373,"uuid":"791147332","full_name":"tniah/flask-audit-log","owner":"tniah","description":"Flask-Auditor is an extension for Flask that extract request and response to audit log.","archived":false,"fork":false,"pushed_at":"2024-05-22T07:02:44.000Z","size":55,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-05-22T11:01:53.242Z","etag":null,"topics":["audit-log","flask","flask-extension","python3"],"latest_commit_sha":null,"homepage":"https://github.com/tniah/flask-audit-log","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tniah.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-04-24T07:20:28.000Z","updated_at":"2024-05-22T07:02:48.000Z","dependencies_parsed_at":null,"dependency_job_id":"b8b336a6-4359-40db-93ec-c87252293987","html_url":"https://github.com/tniah/flask-audit-log","commit_stats":null,"previous_names":["tniah/flask-audit-log"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tniah%2Fflask-audit-log","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tniah%2Fflask-audit-log/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tniah%2Fflask-audit-log/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tniah%2Fflask-audit-log/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tniah","download_url":"https://codeload.github.com/tniah/flask-audit-log/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246026113,"owners_count":20711581,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["audit-log","flask","flask-extension","python3"],"created_at":"2024-12-07T21:10:59.815Z","updated_at":"2026-04-27T12:04:05.648Z","avatar_url":"https://github.com/tniah.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Flask-Auditor\n\nFlask-Auditor is an extension for Flask that extracts request and response to audit log.\n\n## Installing\n\nInstall and upgrade using pip:\n\n```shell\n$ pip install flask-auditor\n```\n\n## A simple example\n\n```py\nfrom flask import Flask\nfrom flask import jsonify\n\nfrom flask_auditor import FlaskAuditor\n\napp = Flask(__name__)\napp.config['AUDIT_LOGGER_SOURCE_NAME'] = 'auditLogger'\nauditor = FlaskAuditor(app)\n\n\n@app.route('/api/v1/users', methods=['GET'])\n@auditor.log(action_id='LIST_USERS', description='Fetch a list of users')\ndef list_users():\n    resp = jsonify({\n        'users': [\n            {\n                'id': 1,\n                'name': 'Makai'\n            },\n            {\n                'id': 2,\n                'name': 'TNiaH'\n            }\n        ]\n    })\n    resp.status_code = 200\n    return resp\n\n\nif __name__ == '__main__':\n    app.run(debug=True)\n\n```\n\n## Audit Log Example\n\n```json\n{\n  \"source\": \"auditLogger\",\n  \"startTime\": \"2024-05-22 11:45:42\",\n  \"actionId\": \"LIST_USERS\",\n  \"description\": \"Fetch a list of users\",\n  \"request\": {\n    \"serverHost\": \"127.0.0.1\",\n    \"serverPort\": 5000,\n    \"requestID\": \"N/A\",\n    \"remoteIP\": \"127.0.0.1\",\n    \"remotePort\": 34038,\n    \"protocol\": \"HTTP/1.1\",\n    \"host\": \"127.0.0.1:5000\",\n    \"method\": \"GET\",\n    \"uri\": \"/api/v1/users?page=1\u0026limit=10\",\n    \"uriPath\": \"/api/v1/users\",\n    \"routePath\": \"/api/v1/users\",\n    \"referer\": \"N/A\",\n    \"userAgent\": \"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/118.0.0.0 Safari/537.36\",\n    \"contentLength\": \"N/A\",\n    \"headers\": {\n      \"Accept-Encoding\": \"gzip, deflate, br\"\n    },\n    \"queryParams\": {\n      \"page\": [\n        \"1\"\n      ],\n      \"limit\": [\n        \"10\"\n      ]\n    },\n    \"requestBody\": {}\n  },\n  \"response\": {\n    \"statusCode\": 200,\n    \"status\": \"OK\",\n    \"responseSize\": 120\n  },\n  \"latency\": 0.00011\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftniah%2Fflask-audit-log","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftniah%2Fflask-audit-log","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftniah%2Fflask-audit-log/lists"}