{"id":39613361,"url":"https://github.com/3scale-qe/3scale-api-python","last_synced_at":"2026-01-18T08:12:50.640Z","repository":{"id":41742180,"uuid":"173906364","full_name":"3scale-qe/3scale-api-python","owner":"3scale-qe","description":"3scale API Python Client","archived":false,"fork":false,"pushed_at":"2025-12-06T03:17:02.000Z","size":428,"stargazers_count":5,"open_issues_count":8,"forks_count":20,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-12-21T22:32:12.690Z","etag":null,"topics":["3scale","api","pipenv","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/3scale-qe.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,"zenodo":null}},"created_at":"2019-03-05T08:30:06.000Z","updated_at":"2025-06-23T12:04:44.000Z","dependencies_parsed_at":"2024-02-14T14:27:29.472Z","dependency_job_id":"6c0ef7d0-807a-4989-8b1b-b0a7898699f8","html_url":"https://github.com/3scale-qe/3scale-api-python","commit_stats":null,"previous_names":["pestanko/3scale-api-python"],"tags_count":26,"template":false,"template_full_name":null,"purl":"pkg:github/3scale-qe/3scale-api-python","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/3scale-qe%2F3scale-api-python","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/3scale-qe%2F3scale-api-python/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/3scale-qe%2F3scale-api-python/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/3scale-qe%2F3scale-api-python/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/3scale-qe","download_url":"https://codeload.github.com/3scale-qe/3scale-api-python/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/3scale-qe%2F3scale-api-python/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28534140,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-18T00:39:45.795Z","status":"online","status_checked_at":"2026-01-18T02:00:07.578Z","response_time":98,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["3scale","api","pipenv","python"],"created_at":"2026-01-18T08:12:50.378Z","updated_at":"2026-01-18T08:12:50.608Z","avatar_url":"https://github.com/3scale-qe.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 3scale REST API client in Python\n\n3Scale REST API client in a wrapper over the 3scale API.\n\n[![lint \u0026 smoke](https://github.com/3scale-qe/3scale-api-python/actions/workflows/lint-and-smoke.yml/badge.svg)](https://github.com/3scale-qe/3scale-api-python/actions)\n\n## Installing\n\nInstall and update using pip:\n\n```bash\npip install 3scale-api\n```\n\nOr as a dependency using the pipenv\n\n```bash\npipenv install 3scale-api\n```\n\n## Usage\n\nClient supports basic CRUD operations and it using the official 3scale API.\n\nThe API can be found at `\u003chttps://yourdomain-admin.3scale.net\u003e/p/admin/api_docs`\n\nBasic usage of the client:\n\n\n```python\nfrom threescale_api import ThreeScaleClient, resources\nfrom typing import List\n\nclient = ThreeScaleClient(url=\"myaccount.3scale.net\", token=\"secret_token\", ssl_verify=True)\n\n# Get list of APIs/Services or any other resource\nservices: List[resources.Service] = client.services.list()\n\n# Get service by it's name\ntest_service: resources.Service = client.services[\"test_service\"] # or use: client.services.read_by_name(system_name)\n\n# Get service by it's id\ntest_service: resources.Service = client.services[12345] # or use client.services.read(id)\n\n# To get raw JSON response - you can use the fetch method - it takes the service id\nraw_json: dict = client.services.fetch(12345)\n\n# To create a new service (or any other resource), parameters are the same as you would provide by the documentation\nnew_service: resources.Service = client.services.create(system_name='my_testing_service', name=\"My Testing service\")\n\n# In order to update service you can either\nclient.services[123456].update(param=\"new_value\")\n# or\nservice: resources.Service = client.services[123456]\nservice['param'] = 'new_value'\nservice.update()\n\n# To get a proxy config you can use\nproxy: resources.Proxy = client.services['test_service'].proxy.read()\n\n# To update the proxy you can either\nproxy: resources.Proxy = client.services['test_service'].proxy.update(parameter_to_update='update')\n# or\nproxy_instance = client.services['test_service'].proxy.read()\nproxy_instance['param'] = 'new_value'\nproxy_instance.update()\n\n# On the service you can access the:\nservice: resources.Service = client.services[123456]\nservice.proxy           # The PROXY client\nservice.mapping_rules   # mapping rules client\nservice.metrics         # metrics\nservice.app_plans       # application plans\n\n# The proxy supports:\nproxy = service.proxy.read()\nproxy.promote(version=1, from_env=\"sandbox\", to_env=\"production\") # The promote operation\nproxy.mapping_rules # The mapping rules\nproxy.configs       # proxy configurations client\nproxy.policies      # Policies defined for the API\n```\n\n## Run the Tests\n\nTo run the tests you need to have installed development dependencies:\n```bash\npipenv install --dev\n```\n\nand then run the `pytest`:\n\n```bash\npipenv run pytest -v\n```\n\n### Integration tests configuration\n\nTo run the integration tests you need to set these env variables:\n```\nTHREESCALE_PROVIDER_URL='https://example-admin.3scale.net'\nTHREESCALE_PROVIDER_TOKEN='\u003ctest-token\u003e'\n\n# OPTIONAL:\nTHREESCALE_MASTER_URL='https://master.3scale.net'\nTHREESCALE_MASTER_TOKEN='\u003ctest-master-token\u003e'\n```\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F3scale-qe%2F3scale-api-python","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F3scale-qe%2F3scale-api-python","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F3scale-qe%2F3scale-api-python/lists"}