{"id":25239176,"url":"https://github.com/denver-code/logdriver","last_synced_at":"2025-04-05T19:38:10.587Z","repository":{"id":188292919,"uuid":"678463235","full_name":"denver-code/logdriver","owner":"denver-code","description":"logunit python client","archived":false,"fork":false,"pushed_at":"2023-08-14T18:58:00.000Z","size":22,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-11T18:14:08.570Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/denver-code.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-08-14T16:00:05.000Z","updated_at":"2023-08-14T16:37:10.000Z","dependencies_parsed_at":"2023-08-14T19:45:47.994Z","dependency_job_id":null,"html_url":"https://github.com/denver-code/logdriver","commit_stats":null,"previous_names":["denver-code/logdriver"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/denver-code%2Flogdriver","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/denver-code%2Flogdriver/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/denver-code%2Flogdriver/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/denver-code%2Flogdriver/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/denver-code","download_url":"https://codeload.github.com/denver-code/logdriver/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247393555,"owners_count":20931809,"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":[],"created_at":"2025-02-11T18:14:15.101Z","updated_at":"2025-04-05T19:38:10.555Z","avatar_url":"https://github.com/denver-code.png","language":"Python","readme":"# LogDriver Python Library\n\nThe LogDriver  Python Library is a tool that allows you to easily send and retrieve logs from a [log server](https://github.com/denver-code/logunit). It provides a user-friendly interface to interact with the log server's API endpoints. This library is particularly useful for applications where security is not a primary concern, as it lacks authentication and encryption mechanisms.\n\n## Getting Started\n\nTo start using the LogDriver Python Library, you can install it directly from the GitHub repository. Follow these steps:\n\n1. **Clone the Repository**: Clone the LogDriver Unsecured repository to your local machine using the following command:\n\n```bash\ngit clone https://github.com/denver-code/logdriver.git\n ```\n\n2. **Move the logdriver** folder to your project's root or utils directory.\n3. **Install dependencies** \n```bash\npoetry add requests\npip install requests\n```\n4. **Import the library**: Import the library into your project using the following command:\n\n```python\nimport logdriver\n```\n\n\n## Unsecured LogDriver usage\n\n1. **Initialize the UnsecureLogDriver**: Initialize the LogDriver using the following command:\n\n```python\nfrom logdriver.unsecured import UnsecuredDriver\n\nudriver = UnsecuredDriver(\"driver-client\", \"http://localhost:8000\")\n```\n\n2. **Send a log**: Send a log to the LogDriver using the following command:\n\n```python\nudriver.log({\"message\": \"Hello world!\", \"data\": {\"foo\": \"bar\"}})\n```\n\n3. **Retrieve log by reference**: Retrieve logs from the LogDriver using the following command:\n\n```python\nreference_id = udriver.log({\"message\": \"Hello world!\", \"data\": {\"foo\": \"bar\"}})\nudriver.get(reference_id)\n```\n\n4. **Retrieve today's logs**: Retrieve logs from the LogDriver using the following command:\n\n```python\nudriver.today()\n```\n\n5. **Log query filters**: Retrieve logs from the LogDriver using the following command:\n\n```python\nudriver.today(offset=0, limit=1, service='driver-client', level='INFO')\n```","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdenver-code%2Flogdriver","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdenver-code%2Flogdriver","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdenver-code%2Flogdriver/lists"}