{"id":23104096,"url":"https://github.com/glueops/python-glueops-helpers-library","last_synced_at":"2025-04-03T22:11:22.823Z","repository":{"id":198977454,"uuid":"701927419","full_name":"GlueOps/python-glueops-helpers-library","owner":"GlueOps","description":"The GlueOps Helpers Library is a collection of utility functions and classes for simplifying common tasks in Python projects. It includes helpers for logging, AWS interactions, Kubernetes configuration, Vault integration, and GetOutline API management. Easily installable via pip.","archived":false,"fork":false,"pushed_at":"2024-11-21T19:47:21.000Z","size":79,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-03-28T11:44:05.475Z","etag":null,"topics":["api","api-client","aws-interactions","getoutline","getoutline-api","glueops-platform","kubernetes","kubernetes-configuration","logging","python","python-getoutline","python-kubernetes","python-logging","python-outline","utilities","vault","vault-integration"],"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/GlueOps.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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-10-08T01:33:54.000Z","updated_at":"2025-01-22T17:12:07.000Z","dependencies_parsed_at":null,"dependency_job_id":"226053fd-a190-4d2c-a0e6-4efc5f7adff0","html_url":"https://github.com/GlueOps/python-glueops-helpers-library","commit_stats":null,"previous_names":["glueops/python-utility-library","glueops/python-helper-library","glueops/python-helpers-library"],"tags_count":33,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GlueOps%2Fpython-glueops-helpers-library","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GlueOps%2Fpython-glueops-helpers-library/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GlueOps%2Fpython-glueops-helpers-library/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GlueOps%2Fpython-glueops-helpers-library/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GlueOps","download_url":"https://codeload.github.com/GlueOps/python-glueops-helpers-library/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247086030,"owners_count":20881160,"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":["api","api-client","aws-interactions","getoutline","getoutline-api","glueops-platform","kubernetes","kubernetes-configuration","logging","python","python-getoutline","python-kubernetes","python-logging","python-outline","utilities","vault","vault-integration"],"created_at":"2024-12-17T00:31:20.218Z","updated_at":"2025-04-03T22:11:22.805Z","avatar_url":"https://github.com/GlueOps.png","language":"Python","readme":"# GlueOps Helpers Library\n\nThe GlueOps Helpers Library is a collection of utility functions and classes designed to simplify common tasks in Python projects. This library includes helpers for logging, AWS interactions, Kubernetes configuration, and more.\n\n## Installation\n\nTo install the GlueOps Helpers Library, you can use pip with the following command:\n\n```bash\npip install https://github.com/GlueOps/python-glueops-helpers-library/archive/refs/tags/v0.6.0.zip\n```\n\n# Usage\n\n## Logging\n\nThe library provides a logging configuration utility that sets up a JSON formatter for structured logging.\n\n```python\nimport os\nfrom glueops import setup_logging\n\nLOG_LEVEL = os.getenv(\"LOG_LEVEL\", \"INFO\")\nlogger = setup_logging.configure(level=LOG_LEVEL)\n\nlogger.info(\"This is an info message\")\nlogger.error(\"This is an error message\")\n```\n\n## AWS\nThe library includes helpers for creating AWS clients and retrieving resources based on tags.\n\n```python\nfrom glueops.aws import create_aws_client, get_resource_arns_using_tags\n\n# Create an AWS client\ns3_client = create_aws_client('s3')\n\n# Get resource ARNs using tags\ntags = [{'Key': 'Environment', 'Value': 'Production'}]\nresource_arns = get_resource_arns_using_tags(tags, ['s3'])\nprint(resource_arns)\n```\n\n## Kubernetes\n\n```python\nimport os\nfrom glueops.setup_kubernetes import load_kubernetes_config\n\nlogger = setup_logging.configure(level=\"INFO\")\nv1, custom_api = load_kubernetes_config(logger)\n\n# Example: List all pods in the default namespace\npods = v1.list_namespaced_pod(namespace='default')\nfor pod in pods.items:\n    print(pod.metadata.name)\n```\n\n## Vault\n\nThe library includes a client for interacting with HashiCorp Vault, supporting both Kubernetes and Pomerium authentication.\n\n```python\nfrom glueops.vault_client import VaultClient\n\nvault_url = \"https://vault.example.com\"\nkubernetes_role = \"my-role\"\nvault_client = VaultClient(vault_url, kubernetes_role)\n\n# Get data from Vault\nsecret_path = \"secret/data/my-secret\"\ndata = vault_client.get_data_from_vault(secret_path)\nprint(data)\n\n# Write data to Vault\ndata_to_write = {\"key\": \"value\"}\nvault_client.write_data_to_vault(secret_path, data_to_write)\n```\n\n## GetOutline\n\nThe library provides a client for interacting with the GetOutline API for managing documents.\n\n```python\nfrom glueops.getoutline import GetOutlineClient\n\napi_url = \"https://api.getoutline.com\"\ndocument_id = \"your_document_id\"\napi_token = \"your_api_token\"\noutline_client = GetOutlineClient(api_url, document_id, api_token)\n\n# Create a new document\nparent_document_id = \"parent_document_id\"\ntitle = \"New Document\"\ntext = \"This is the content of the new document.\"\noutline_client.create_document(parent_document_id, title, text)\n```","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fglueops%2Fpython-glueops-helpers-library","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fglueops%2Fpython-glueops-helpers-library","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fglueops%2Fpython-glueops-helpers-library/lists"}