{"id":24216715,"url":"https://github.com/codekidx/pyloki","last_synced_at":"2026-05-10T13:11:34.972Z","repository":{"id":50045607,"uuid":"361117530","full_name":"codekidX/pyloki","owner":"codekidX","description":"A scalable logging module and client(Alpha) for Grafana Loki","archived":false,"fork":false,"pushed_at":"2021-06-06T09:22:16.000Z","size":10,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-02T09:37:48.478Z","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":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/codekidX.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-04-24T09:08:49.000Z","updated_at":"2021-09-14T08:41:23.000Z","dependencies_parsed_at":"2022-08-30T03:40:30.455Z","dependency_job_id":null,"html_url":"https://github.com/codekidX/pyloki","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codekidX%2Fpyloki","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codekidX%2Fpyloki/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codekidX%2Fpyloki/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codekidX%2Fpyloki/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/codekidX","download_url":"https://codeload.github.com/codekidX/pyloki/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241739431,"owners_count":20012103,"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-01-14T04:46:19.917Z","updated_at":"2026-05-10T13:11:34.895Z","avatar_url":"https://github.com/codekidX.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"PyLoki\n------\n\nA scalable instance associated module for logging and querying(alpha) in Grafana Loki\n\n\n## Get Started\n\n```bash\npip install pyloki\n```\n\n```bash\nfrom pyloki import PyLoki\n\nauth_loki = PyLoki(source='Authentication Service', job='auth.service')\nauth_loki.warn('This module is warning me of something')\n```\n\n### Configurable Instance Options\n\n- host: Host of your Loki instance `default: localhost`\n- port: Port if needed `default: 3100`\n- If secured:\n\t- username\n\t- password\n- protocol: Protocol to follow `default: http`\n- src_host: Host from which the logs are being streamed\n\n\n### Functions\n\n```python\nset_tz(zone='Asia/Kolkata')\n```\n\nSets your timezone for the log stream\n\n```python\nset_header(key, value)\n```\n\nSets additional http headers to logs\n\n\n## Contributing\n\n- Create a python3 virtualenv \n```bash\npython3 -m venv venv\n```\n\n- Install requirements\n```bash\npip install -r requirements.txt\n```\n\n- **Before submitting** Run the tests. New tests for your PRs are most appreciated.\n```bash\npython -m pyloki.loki_test\n```\n\n## Versions\n\n\u003e ### 0.2.1\n- Add `error` method on PyLoki\n- Add `custom` method to pass your own label on PyLoki\n\n\u003e ### 0.2.0\n- Proper implementation of logger\n- Add Testsfor logging\n- Add alpha client for querying the logs\n\n\u003e ### 0.1.0\n- Alpha with barely working code\n\n### License\n\nMIT","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodekidx%2Fpyloki","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodekidx%2Fpyloki","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodekidx%2Fpyloki/lists"}