Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 12 additions & 9 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,20 +35,23 @@ jobs:
cache: "pip"
cache-dependency-path: |
**/pyproject.toml
**/requirements*.txt
**/test-requirements*.txt

- name: Install dependencies
run: |
pip install -r test-requirements.txt --upgrade pip
pip install "urllib3==${{ matrix.urllib3-version }}"

- if: matrix.python-version == '3.10' && matrix.urllib3-version == '1.26.19'
name: Run `ruff`
run: ruff check
pip install uv
export UV_LINK_MODE=copy && \
uv sync --group dev && \
uv run ruff check --select I --fix . && \
uv run ruff format . && \
uv build

- name: Run tests and collect coverage
run: pytest --cov-fail-under 60 --cov openfga_sdk
run: |
export UV_LINK_MODE=copy && \
uv sync --group dev && \
uv run --with "urllib3==${{ matrix.urllib3-version }}" \
pytest --cov-report term-missing --cov=openfga_sdk --cov-fail-under=60 test/ && \
uv run ruff check .

- if: matrix.python-version == '3.10' && matrix.urllib3-version == '1.26.19'
name: Upload coverage to Codecov
Expand Down
3 changes: 3 additions & 0 deletions .openapi-generator-ignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,6 @@ test/*
.travis.yml
tox.ini
setup.cfg
setup.py
requirements.txt
test-requirements.txt
3 changes: 0 additions & 3 deletions .openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -254,9 +254,6 @@ openfga_sdk/telemetry/telemetry.py
openfga_sdk/validation.py
pyproject.toml
README.md
requirements.txt
setup.py
test-requirements.txt
test/__init__.py
test/_/configuration_test.py
test/_/credentials_test.py
Expand Down
63 changes: 62 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,64 @@
#
# Python SDK for OpenFGA
#
# API version: 1.x
# Website: https://openfga.dev
# Documentation: https://openfga.dev/docs
# Support: https://openfga.dev/community
# License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE)
#

[project]
name = "openfga-sdk"
version = "0.9.5"
description="A high performance and flexible authorization/permission engine built for developers and inspired by Google Zanzibar."
authors = [
{ name = "OpenFGA (https://openfga.dev)", email = "[email protected]"}
]
readme = "README.md"
classifiers=[
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"License :: OSI Approved :: Apache Software License",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
]
keywords=[
"openfga",
"authorization",
"fga",
"fine-grained-authorization",
"rebac",
"zanzibar",
]
requires-python=">=3.10"
license="Apache-2.0"
dependencies = [
"aiohttp>=3.9.3",
"python-dateutil>=2.9.0",
"opentelemetry-api>=1.25.0",
"urllib3>=1.26.19,<3"
]

[project.urls]
Repository="https://github.com/openfga/python-sdk.git"

[dependency-groups]
dev = [
"griffe>=0.41.2",
"mock>=5.1.0",
"pytest-asyncio>=0.25",
"pytest-cov>=5",
"ruff>=0.9",
"mypy>=1.14.1",
]

[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"


[tool.ruff]
exclude = [
".bzr",
Expand Down Expand Up @@ -79,7 +140,7 @@ asyncio_default_fixture_loop_scope = "function"
python_version = "3.10"
packages = "openfga_sdk"
exclude = [
"openfa_sdk/models",
"openfga_sdk/models",
]
#warn_return_any = "True"
#warn_unused_configs = "True"
Expand Down
6 changes: 0 additions & 6 deletions requirements.txt

This file was deleted.

64 changes: 0 additions & 64 deletions setup.py

This file was deleted.

8 changes: 0 additions & 8 deletions test-requirements.txt

This file was deleted.

Loading