{"id":21076011,"url":"https://github.com/marcbperez/flask-logservice","last_synced_at":"2026-04-11T11:03:52.543Z","repository":{"id":258645051,"uuid":"90709586","full_name":"marcbperez/flask-logservice","owner":"marcbperez","description":"Log service for Flask.","archived":false,"fork":false,"pushed_at":"2020-11-18T12:04:34.000Z","size":82,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-08-02T14:39:45.948Z","etag":null,"topics":["docker","flask","flask-restful","flask-sqlalchemy","gradle","python"],"latest_commit_sha":null,"homepage":"","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/marcbperez.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2017-05-09T06:20:29.000Z","updated_at":"2025-05-21T01:53:38.000Z","dependencies_parsed_at":"2024-10-20T00:50:41.664Z","dependency_job_id":null,"html_url":"https://github.com/marcbperez/flask-logservice","commit_stats":null,"previous_names":["marcbperez/flask-logservice"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/marcbperez/flask-logservice","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcbperez%2Fflask-logservice","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcbperez%2Fflask-logservice/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcbperez%2Fflask-logservice/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcbperez%2Fflask-logservice/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/marcbperez","download_url":"https://codeload.github.com/marcbperez/flask-logservice/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcbperez%2Fflask-logservice/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31677819,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-11T08:18:19.405Z","status":"ssl_error","status_checked_at":"2026-04-11T08:17:08.892Z","response_time":54,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["docker","flask","flask-restful","flask-sqlalchemy","gradle","python"],"created_at":"2024-11-19T19:26:03.947Z","updated_at":"2026-04-11T11:03:52.519Z","avatar_url":"https://github.com/marcbperez.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# flask-logservice\n\nLog service for Flask.\n\n## Installation\n\nStart by downloading and building the project when necessary. The following\ncommands will do the job on most Debian based Linux distributions.\n\n```bash\ngit clone https://github.com/marcbperez/flask-logservice\ncd flask-logservice\nexport FLASK_APP=\"restfuloauth2\"\nexport SECRET_KEY=\"non-production-key\"\nsudo -HE ./gradlew\n```\n\n## Usage\n\nTo start the service set the environment variables and run flask, it will be\navailable at `http://127.0.0.1:5000`.\n\n```bash\nsudo -HE flask run\n```\n\nFirst, access `http://127.0.0.1:5000` and create a user and api client. Then use\nthe client id, username and password to generate a bearer token.\n\n```bash\ncurl -X POST -d \\\n\"grant_type=password\u0026client_id=8diLQbKSkseuZ99Q3kwFAWugXjDvImrqTALeM7sd\\\n\u0026username=user\u0026password=pass\" \\\nhttp://127.0.0.1:5000/v1/oauth/token\n```\n\nThe bearer token can now be used to access the user's protected data.\n\n```bash\ncurl -H \"Authorization: Bearer nOVFSNUDoP2bC1ScMRuYz8zCXeTY8F\" \\\nhttp://127.0.0.1:5000/v1/oauth/check\n```\n\nThe example log api is protected and will need a valid user, client and bearer\ntoken. To list, add, modify and delete tasks see the script below.\n\n```bash\n# GET the log list.\ncurl -H \"Authorization: Bearer yIMqTV5zOGQlRpIMBMpZnyHFMR0QW3\" \\\nhttp://127.0.0.1:5000/v1/log\n# Paginate and sort de log list by ascending (asc) or descending (desc).\ncurl -H \"Authorization: Bearer yIMqTV5zOGQlRpIMBMpZnyHFMR0QW3\" \\\n\"http://127.0.0.1:5000/v1/log?page=1\u0026max_results=5\u0026sort=id-desc\"\n# CREATE a new log.\ncurl -X POST -H \"Authorization: Bearer yIMqTV5zOGQlRpIMBMpZnyHFMR0QW3\" \\\n-d \"public=0\u0026message=Hello world!\" \\\nhttp://127.0.0.1:5000/v1/log\n# MODIFY a log stating its etag.\ncurl -X PUT -H \"Authorization: Bearer yIMqTV5zOGQlRpIMBMpZnyHFMR0QW3\" \\\n-d \"etag=rz05FPx8qOIYJdmYZNLvcWupzh9qLlSoZnphpBFC\\\n    \u0026public=1\u0026message=Hello universe!\" \\\nhttp://127.0.0.1:5000/v1/log/1\n# GET a log.\ncurl -H \"Authorization: Bearer yIMqTV5zOGQlRpIMBMpZnyHFMR0QW3\" \\\nhttp://127.0.0.1:5000/v1/log/1\n# DELETE a log stating its etag.\ncurl -X DELETE -H \"Authorization: Bearer yIMqTV5zOGQlRpIMBMpZnyHFMR0QW3\" \\\n-d \"etag=DMwVytdmg3CtwDgbm9wWOINjX73Iev2n4NFkRsV7\" \\\nhttp://127.0.0.1:5000/v1/log/1\n```\n\nA search operation is also available. To use it send an url-encoded JSON\n`search` parameter to an item endpoint such as `http://127.0.0.1:5000/v1/log`.\nValid column condition operators are `and` and `or`. As for column operators all\n `=`, `!=`, `\u003c`, `\u003c=`, `\u003e`, `\u003e=` and `like` are available.\n\n```json\n{\n  \"operator\": \"and\",\n  \"conditions\": [\n    {\n      \"column\": \"id\",\n      \"operator\": \"=\",\n      \"value\": 3\n    },\n    {\n      \"operator\": \"or\",\n      \"conditions\": [\n        {\n          \"column\": \"public\",\n          \"operator\": \"=\",\n          \"value\": 1\n        },\n        {\n          \"column\": \"etag\",\n          \"operator\": \"!=\",\n          \"value\": \"\"\n        }\n      ]\n    }\n  ]\n}\n```\n\n## Testing\n\nTest checks are executed automatically every time the project is built. Builds\ncan be done remotely or continuously on a development context. For continuous\nintegration and development use docker-compose. This is recommended to keep the\nsystem clean while the project is built every time the sources change.\n\n```bash\nsudo docker-compose up\n```\n\nFor continuous integration and development without any dependencies use the\nGradle wrapper. This is the best option if the wrapper is available and the\nDocker context is not valid. For a full list of tasks, see\n`sudo ./gradlew tasks --all`. For a CI cycle use `sudo ./gradlew --continuous`.\n\nFor continuous integration and development without Docker or the project wrapper\nuse Gradle directly. This will create the wrapper in case it is not present.\nSimilar to the above, for a CI cycle use `sudo gradle --continuous`. Gradle\n3.4.1 is required for this to work. Plain Docker is also available for remote\nintegration tasks and alike. Build the image with `sudo docker build .` and run\na new container with it. Information on how to install Docker and docker-compose\ncan be found in their [official page][install-docker-compose]. A similar\ninstallation guide is available [for Gradle][install-gradle].\n\n## Troubleshooting\n\nThe [issue tracker][issue-tracker] intends to manage and compile bugs,\nenhancements, proposals and tasks. Reading through its material or reporting to\nits contributors via the platform is strongly recommended.\n\n## Contributing\n\nThis project adheres to [Semantic Versioning][semver] and to certain syntax\nconventions defined in [.editorconfig][editorconfig]. To get a list of changes\nrefer to the [CHANGELOG][changelog]. Only branches prefixed by *feature-*,\n*hotfix-*, or *release-* will be considered:\n\n  - Fork the project.\n  - Create your new branch: `git checkout -b feature-my-feature develop`\n  - Commit your changes: `git commit -am 'Added my new feature.'`\n  - Push the branch: `git push origin feature-my-feature`\n  - Submit a pull request.\n\n## Credits\n\nThis project is created by [marcbperez][author] and maintained by its\n[author][author] and contributors.\n\n## License\n\nThis project is licensed under the [Apache License Version 2.0][license].\n\n[author]: https://marcbperez.github.io\n[issue-tracker]: https://github.com/marcbperez/flask-logservice/issues\n[editorconfig]: .editorconfig\n[changelog]: CHANGELOG.md\n[license]: LICENSE\n[semver]: http://semver.org\n[install-docker-compose]: https://docs.docker.com/compose/install/\n[install-gradle]: https://gradle.org/install\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarcbperez%2Fflask-logservice","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarcbperez%2Fflask-logservice","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarcbperez%2Fflask-logservice/lists"}