{"id":26514896,"url":"https://github.com/devcyclehq/python-server-sdk","last_synced_at":"2026-01-28T17:15:59.598Z","repository":{"id":37544359,"uuid":"431244261","full_name":"DevCycleHQ/python-server-sdk","owner":"DevCycleHQ","description":"DevCycle - Python Server SDK","archived":false,"fork":false,"pushed_at":"2024-10-25T14:57:44.000Z","size":583,"stargazers_count":19,"open_issues_count":2,"forks_count":5,"subscribers_count":7,"default_branch":"main","last_synced_at":"2025-01-18T16:12:10.592Z","etag":null,"topics":["continuous-delivery","continuous-deployment","devcycle","devops","feature-flags","feature-toggles","openfeature"],"latest_commit_sha":null,"homepage":"https://docs.devcycle.com/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DevCycleHQ.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}},"created_at":"2021-11-23T20:29:36.000Z","updated_at":"2024-10-25T14:57:48.000Z","dependencies_parsed_at":"2023-10-25T00:25:38.477Z","dependency_job_id":"35a6845e-2683-493f-b2b0-b5be862c10c9","html_url":"https://github.com/DevCycleHQ/python-server-sdk","commit_stats":{"total_commits":16,"total_committers":6,"mean_commits":"2.6666666666666665","dds":0.75,"last_synced_commit":"07e26655f077daef927833658b49cbcfb673c81a"},"previous_names":[],"tags_count":28,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DevCycleHQ%2Fpython-server-sdk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DevCycleHQ%2Fpython-server-sdk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DevCycleHQ%2Fpython-server-sdk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DevCycleHQ%2Fpython-server-sdk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DevCycleHQ","download_url":"https://codeload.github.com/DevCycleHQ/python-server-sdk/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248045230,"owners_count":21038553,"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":["continuous-delivery","continuous-deployment","devcycle","devops","feature-flags","feature-toggles","openfeature"],"created_at":"2025-03-21T05:29:42.196Z","updated_at":"2026-01-28T17:15:59.558Z","avatar_url":"https://github.com/DevCycleHQ.png","language":"Python","readme":"# DevCycle Python Server SDK\n\nThe DevCycle Python SDK used for feature management.\n\nThis SDK allows your application to interface with the [DevCycle Bucketing API](https://docs.devcycle.com/bucketing-api/#tag/devcycle).\n\n## Requirements\n\n* Python 3.9+\n\n## Installation\n\n```sh\npip install devcycle-python-server-sdk\n```\n\n(you may need to run `pip` with root permission: `sudo pip install devcycle-python-server-sdk`)\n\n## Getting Started\n\nThe core DevCycle objects are in the `devcycle_python_sdk` package. To get started, import the `DevCycleLocalClient` class and the `DevCycleLocalOptions` class. The `DevCycleLocalClient` class is used to interact with the DevCycle API. The `DevCycleLocalOptions` class is used to configure the client.\n\n```python\nfrom devcycle_python_sdk import DevCycleLocalClient, DevCycleLocalOptions\nfrom devcycle_python_sdk.models.user import DevCycleUser\n\noptions = DevCycleLocalOptions()\n\n# create an instance of the client class\nclient = DevCycleLocalClient('DEVCYCLE_SERVER_SDK_KEY', options)\n\nuser = DevCycleUser(\n    user_id='test',\n    email='example@example.ca',\n    country='CA'\n)\n\nvalue = client.variable_value(user, 'variable-key', 'default-value')\n```\n\nThe DevCycle client is designed to work as a singleton in your application. You should create a single instance of the client during application initialization\n\n## OpenFeature Support\n\nThis SDK provides an alpha implementation of the [OpenFeature](https://openfeature.dev/) Provider interface. Use the `get_openfeature_provider()` function on the DevCycle SDK client to obtain a provider for OpenFeature.\n\n```python\nfrom openfeature import api\n\ndevcycle_client = DevCycleLocalClient('DEVCYCLE_SERVER_SDK_KEY', options)\napi.set_provider(devcycle_client.get_openfeature_provider())\n```\n\nMore details are in the [DevCycle Python SDK OpenFeature Provider](OpenFeature.md) guide.\n\n\u003e :warning: **OpenFeature support is in an early release and may have some rough edges**. Please report any issues to us and we'll be happy to help!\n\n## Usage\n\nTo find usage documentation, visit our [docs](https://docs.devcycle.com/docs/sdk/server-side-sdks/python#usage).\n\n## Development\n\nWhen developing the SDK it is recommended that you have both a 3.8 and 3.12 python interpreter installed in order to verify changes across different versions of python.\n\n### Dependencies\n\nTo set up dependencies for local development, run:\n\n```bash\npip install -r requirements.test.txt\n```\n\nTo run the example app against the local version of the API for testing and development, run:\n\n```bash\npip install --editable .\n```\n\nfrom the top level of the repo (same level as setup.py). Then run the example app as normal:\n\n```bash\npython example/local_bucketing_client_example.py\n```\n\n### Linting \u0026 Formatting\n\nLinting checks on PRs are run using [ruff](https://github.com/charliermarsh/ruff), and are configured using `.ruff.toml`. To run the linter locally, run this command from the top level of the repo:\n\n```bash\nruff check .\n```\n\nRuff can automatically fix simple linting errors (the ones marked with `[*]`). To do so, run:\n\n```bash\nruff check . --fix\n```\n\nFormatting checks on PRs are done using [black](https://github.com/psf/black). To run the formatter locally, run this command from the top level of the repo:\n\n```bash\nblack .\n```\n\n### Unit Tests\n\nTo run the unit tests, run:\n\n```bash\npytest\n```\n\n### Benchmarks\n\nTo run the benchmarks, run:\n\n```bash\npytest --benchmark-only\n```\n\n### Protobuf Code Generation\n\nTo generate the protobuf source files run the following from the root of the project. Ensure you have `protoc` installed.\n\n```bash\nprotoc --proto_path=./protobuf/ --python_out=devcycle_python_sdk/protobuf --pyi_out=devcycle_python_sdk/protobuf variableForUserParams.proto\n```\n\nThis will rebuild the `variableForUserParams_pb2.py` file. DO NOT edit this file directly.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevcyclehq%2Fpython-server-sdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdevcyclehq%2Fpython-server-sdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevcyclehq%2Fpython-server-sdk/lists"}