postkit 0.1.0__tar.gz → 0.2.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {postkit-0.1.0 → postkit-0.2.0}/PKG-INFO +13 -7
- {postkit-0.1.0 → postkit-0.2.0}/README.md +3 -3
- {postkit-0.1.0 → postkit-0.2.0}/pyproject.toml +24 -8
- {postkit-0.1.0 → postkit-0.2.0}/src/postkit/__init__.py +0 -2
- {postkit-0.1.0 → postkit-0.2.0}/src/postkit/authn/__init__.py +2 -0
- postkit-0.2.0/src/postkit/authn/client.py +1376 -0
- {postkit-0.1.0 → postkit-0.2.0}/src/postkit/authz/__init__.py +2 -0
- postkit-0.2.0/src/postkit/authz/client.py +1271 -0
- postkit-0.2.0/src/postkit/base.py +521 -0
- postkit-0.2.0/src/postkit/config/__init__.py +17 -0
- postkit-0.2.0/src/postkit/config/client.py +596 -0
- postkit-0.2.0/src/postkit/errors.py +213 -0
- postkit-0.2.0/src/postkit/meter/__init__.py +6 -0
- postkit-0.2.0/src/postkit/meter/client.py +662 -0
- postkit-0.2.0/src/postkit/queue/__init__.py +6 -0
- postkit-0.2.0/src/postkit/queue/client.py +843 -0
- {postkit-0.1.0 → postkit-0.2.0}/tests/authn/conftest.py +44 -48
- postkit-0.2.0/tests/authn/helpers.py +208 -0
- postkit-0.2.0/tests/authn/test_audit.py +471 -0
- postkit-0.2.0/tests/authn/test_base.py +90 -0
- postkit-0.2.0/tests/authn/test_credentials.py +476 -0
- postkit-0.2.0/tests/authn/test_disabled_user.py +503 -0
- postkit-0.2.0/tests/authn/test_e2e_demo.py +305 -0
- postkit-0.2.0/tests/authn/test_impersonation.py +799 -0
- {postkit-0.1.0 → postkit-0.2.0}/tests/authn/test_lockout.py +20 -6
- postkit-0.2.0/tests/authn/test_maintenance.py +266 -0
- postkit-0.2.0/tests/authn/test_operator_impersonation.py +1137 -0
- postkit-0.2.0/tests/authn/test_refresh_tokens.py +372 -0
- postkit-0.2.0/tests/authn/test_rls.py +247 -0
- {postkit-0.1.0 → postkit-0.2.0}/tests/authn/test_sessions.py +148 -9
- {postkit-0.1.0 → postkit-0.2.0}/tests/authn/test_tokens.py +8 -12
- postkit-0.2.0/tests/authn/test_users.py +508 -0
- {postkit-0.1.0 → postkit-0.2.0}/tests/authn/test_validation.py +102 -30
- postkit-0.2.0/tests/authz/__init__.py +0 -0
- {postkit-0.1.0 → postkit-0.2.0}/tests/authz/conftest.py +24 -46
- {postkit-0.1.0 → postkit-0.2.0}/tests/authz/helpers.py +13 -0
- {postkit-0.1.0 → postkit-0.2.0}/tests/authz/test_access_patterns.py +94 -126
- {postkit-0.1.0 → postkit-0.2.0}/tests/authz/test_audit.py +187 -77
- {postkit-0.1.0 → postkit-0.2.0}/tests/authz/test_concurrency.py +138 -36
- {postkit-0.1.0 → postkit-0.2.0}/tests/authz/test_consistency.py +39 -48
- {postkit-0.1.0 → postkit-0.2.0}/tests/authz/test_e2e_demo.py +47 -73
- {postkit-0.1.0 → postkit-0.2.0}/tests/authz/test_expiration.py +101 -29
- {postkit-0.1.0 → postkit-0.2.0}/tests/authz/test_groups.py +32 -39
- postkit-0.2.0/tests/authz/test_hierarchy.py +355 -0
- postkit-0.2.0/tests/authz/test_listing.py +201 -0
- postkit-0.2.0/tests/authz/test_maintenance.py +165 -0
- {postkit-0.1.0 → postkit-0.2.0}/tests/authz/test_namespaces.py +9 -26
- {postkit-0.1.0 → postkit-0.2.0}/tests/authz/test_nested_teams.py +56 -48
- {postkit-0.1.0 → postkit-0.2.0}/tests/authz/test_resource_hierarchy.py +42 -42
- postkit-0.2.0/tests/authz/test_rls.py +431 -0
- postkit-0.2.0/tests/authz/test_sdk.py +583 -0
- {postkit-0.1.0 → postkit-0.2.0}/tests/authz/test_stress.py +37 -53
- postkit-0.2.0/tests/authz/test_transactions.py +63 -0
- {postkit-0.1.0 → postkit-0.2.0}/tests/authz/test_validation.py +138 -45
- postkit-0.2.0/tests/config/__init__.py +0 -0
- postkit-0.2.0/tests/config/conftest.py +86 -0
- postkit-0.2.0/tests/config/helpers.py +83 -0
- postkit-0.2.0/tests/config/test_audit.py +404 -0
- postkit-0.2.0/tests/config/test_entries.py +664 -0
- postkit-0.2.0/tests/config/test_rls.py +235 -0
- postkit-0.2.0/tests/config/test_schemas.py +314 -0
- postkit-0.2.0/tests/config/test_tenancy.py +85 -0
- postkit-0.2.0/tests/config/test_validation.py +35 -0
- postkit-0.2.0/tests/conftest.py +32 -0
- postkit-0.2.0/tests/helpers.py +207 -0
- postkit-0.2.0/tests/integration/conftest.py +147 -0
- postkit-0.2.0/tests/integration/test_api_keys.py +150 -0
- postkit-0.2.0/tests/meter/conftest.py +84 -0
- postkit-0.2.0/tests/meter/helpers.py +128 -0
- postkit-0.2.0/tests/meter/test_periods.py +701 -0
- postkit-0.2.0/tests/meter/test_reservation_expiry_race.py +255 -0
- postkit-0.2.0/tests/meter/test_rls.py +179 -0
- postkit-0.2.0/tests/meter/test_sdk.py +872 -0
- postkit-0.2.0/tests/meter/test_validation.py +101 -0
- postkit-0.2.0/tests/queue/__init__.py +1 -0
- postkit-0.2.0/tests/queue/conftest.py +100 -0
- postkit-0.2.0/tests/queue/helpers.py +130 -0
- postkit-0.2.0/tests/queue/test_ack.py +344 -0
- postkit-0.2.0/tests/queue/test_cron.py +192 -0
- postkit-0.2.0/tests/queue/test_dead_letters.py +316 -0
- postkit-0.2.0/tests/queue/test_e2e_demo.py +375 -0
- postkit-0.2.0/tests/queue/test_nack_ack_race.py +240 -0
- postkit-0.2.0/tests/queue/test_pull.py +204 -0
- postkit-0.2.0/tests/queue/test_purge.py +46 -0
- postkit-0.2.0/tests/queue/test_push.py +175 -0
- postkit-0.2.0/tests/queue/test_release_jobs.py +102 -0
- postkit-0.2.0/tests/queue/test_rls.py +235 -0
- postkit-0.2.0/tests/queue/test_schedules.py +351 -0
- postkit-0.2.0/tests/queue/test_stats.py +134 -0
- postkit-0.2.0/tests/queue/test_tenancy.py +170 -0
- postkit-0.2.0/tests/queue/test_tick.py +220 -0
- postkit-0.2.0/tests/queue/test_tick_timeouts.py +150 -0
- postkit-0.2.0/tests/queue/test_validation.py +62 -0
- postkit-0.2.0/tests/test_error_codes.py +82 -0
- postkit-0.2.0/uv.lock +375 -0
- postkit-0.1.0/src/postkit/authn/client.py +0 -567
- postkit-0.1.0/src/postkit/authz/client.py +0 -913
- postkit-0.1.0/tests/authn/helpers.py +0 -108
- postkit-0.1.0/tests/authn/test_audit.py +0 -212
- postkit-0.1.0/tests/authn/test_credentials.py +0 -78
- postkit-0.1.0/tests/authn/test_maintenance.py +0 -96
- postkit-0.1.0/tests/authn/test_mfa.py +0 -135
- postkit-0.1.0/tests/authn/test_rls.py +0 -79
- postkit-0.1.0/tests/authn/test_users.py +0 -244
- postkit-0.1.0/tests/authz/test_hierarchy.py +0 -170
- postkit-0.1.0/tests/authz/test_listing.py +0 -139
- postkit-0.1.0/tests/authz/test_maintenance.py +0 -166
- postkit-0.1.0/tests/authz/test_rls.py +0 -230
- postkit-0.1.0/tests/authz/test_sdk.py +0 -178
- postkit-0.1.0/tests/authz/test_transactions.py +0 -87
- postkit-0.1.0/tests/conftest.py +0 -7
- postkit-0.1.0/uv.lock +0 -251
- {postkit-0.1.0 → postkit-0.2.0}/.gitignore +0 -0
- /postkit-0.1.0/tests/__init__.py → /postkit-0.2.0/src/postkit/py.typed +0 -0
- {postkit-0.1.0/tests/authn → postkit-0.2.0/tests}/__init__.py +0 -0
- {postkit-0.1.0/tests/authz → postkit-0.2.0/tests/authn}/__init__.py +0 -0
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: postkit
|
|
3
|
-
Version: 0.
|
|
4
|
-
Summary: PostgreSQL-native
|
|
3
|
+
Version: 0.2.0
|
|
4
|
+
Summary: PostgreSQL-native auth, permissions, versioned config, usage tracking, and job queues
|
|
5
5
|
Project-URL: Homepage, https://github.com/varunchopra/postkit
|
|
6
6
|
Project-URL: Repository, https://github.com/varunchopra/postkit
|
|
7
|
+
Project-URL: Documentation, https://github.com/varunchopra/postkit/tree/main/docs
|
|
8
|
+
Project-URL: Issues, https://github.com/varunchopra/postkit/issues
|
|
7
9
|
Author: Varun Chopra
|
|
8
10
|
License-Expression: Apache-2.0
|
|
9
11
|
Keywords: authentication,authorization,postgresql,rebac,sdk
|
|
@@ -11,24 +13,28 @@ Classifier: Development Status :: 4 - Beta
|
|
|
11
13
|
Classifier: Intended Audience :: Developers
|
|
12
14
|
Classifier: License :: OSI Approved :: Apache Software License
|
|
13
15
|
Classifier: Programming Language :: Python :: 3
|
|
14
|
-
Classifier: Programming Language :: Python :: 3.10
|
|
15
16
|
Classifier: Programming Language :: Python :: 3.11
|
|
16
17
|
Classifier: Programming Language :: Python :: 3.12
|
|
17
18
|
Classifier: Programming Language :: Python :: 3.13
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
18
20
|
Classifier: Topic :: Database
|
|
19
21
|
Classifier: Topic :: Security
|
|
20
|
-
|
|
22
|
+
Classifier: Typing :: Typed
|
|
23
|
+
Requires-Python: >=3.11
|
|
24
|
+
Requires-Dist: jsonschema>=4.0.0
|
|
21
25
|
Requires-Dist: psycopg>=3.1.0
|
|
22
26
|
Provides-Extra: binary
|
|
23
27
|
Requires-Dist: psycopg[binary]>=3.1.0; extra == 'binary'
|
|
24
28
|
Provides-Extra: dev
|
|
25
29
|
Requires-Dist: psycopg[binary]>=3.1.0; extra == 'dev'
|
|
30
|
+
Requires-Dist: pytest-randomly>=3.0; extra == 'dev'
|
|
31
|
+
Requires-Dist: pytest-xdist>=3.0; extra == 'dev'
|
|
26
32
|
Requires-Dist: pytest>=7.0; extra == 'dev'
|
|
27
33
|
Description-Content-Type: text/markdown
|
|
28
34
|
|
|
29
|
-
# postkit
|
|
35
|
+
# postkit SDK
|
|
30
36
|
|
|
31
|
-
|
|
37
|
+
Python client for postkit.
|
|
32
38
|
|
|
33
39
|
## Installation
|
|
34
40
|
|
|
@@ -49,7 +55,7 @@ cursor = conn.cursor()
|
|
|
49
55
|
# Authorization
|
|
50
56
|
authz = AuthzClient(cursor, namespace="my-app")
|
|
51
57
|
authz.grant("admin", resource=("repo", "api"), subject=("user", "alice"))
|
|
52
|
-
if authz.check("alice", "read", ("repo", "api")):
|
|
58
|
+
if authz.check(("user", "alice"), "read", ("repo", "api")):
|
|
53
59
|
print("Access granted")
|
|
54
60
|
|
|
55
61
|
# Authentication
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
# postkit
|
|
1
|
+
# postkit SDK
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Python client for postkit.
|
|
4
4
|
|
|
5
5
|
## Installation
|
|
6
6
|
|
|
@@ -21,7 +21,7 @@ cursor = conn.cursor()
|
|
|
21
21
|
# Authorization
|
|
22
22
|
authz = AuthzClient(cursor, namespace="my-app")
|
|
23
23
|
authz.grant("admin", resource=("repo", "api"), subject=("user", "alice"))
|
|
24
|
-
if authz.check("alice", "read", ("repo", "api")):
|
|
24
|
+
if authz.check(("user", "alice"), "read", ("repo", "api")):
|
|
25
25
|
print("Access granted")
|
|
26
26
|
|
|
27
27
|
# Authentication
|
|
@@ -1,33 +1,49 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "postkit"
|
|
3
|
-
version = "0.
|
|
4
|
-
description = "PostgreSQL-native
|
|
3
|
+
version = "0.2.0"
|
|
4
|
+
description = "PostgreSQL-native auth, permissions, versioned config, usage tracking, and job queues"
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
license = "Apache-2.0"
|
|
7
|
-
requires-python = ">=3.
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
requires-python = ">=3.11"
|
|
8
|
+
keywords = [
|
|
9
|
+
"postgresql",
|
|
10
|
+
"authentication",
|
|
11
|
+
"authorization",
|
|
12
|
+
"rebac",
|
|
13
|
+
"sdk",
|
|
14
|
+
]
|
|
10
15
|
classifiers = [
|
|
11
16
|
"Development Status :: 4 - Beta",
|
|
12
17
|
"Intended Audience :: Developers",
|
|
13
18
|
"License :: OSI Approved :: Apache Software License",
|
|
14
19
|
"Programming Language :: Python :: 3",
|
|
15
|
-
"Programming Language :: Python :: 3.10",
|
|
16
20
|
"Programming Language :: Python :: 3.11",
|
|
17
21
|
"Programming Language :: Python :: 3.12",
|
|
18
22
|
"Programming Language :: Python :: 3.13",
|
|
23
|
+
"Programming Language :: Python :: 3.14",
|
|
19
24
|
"Topic :: Database",
|
|
20
25
|
"Topic :: Security",
|
|
26
|
+
"Typing :: Typed",
|
|
21
27
|
]
|
|
22
|
-
dependencies = ["psycopg>=3.1.0"]
|
|
28
|
+
dependencies = ["psycopg>=3.1.0", "jsonschema>=4.0.0"]
|
|
29
|
+
|
|
30
|
+
[[project.authors]]
|
|
31
|
+
name = "Varun Chopra"
|
|
23
32
|
|
|
24
33
|
[project.optional-dependencies]
|
|
25
34
|
binary = ["psycopg[binary]>=3.1.0"]
|
|
26
|
-
dev = [
|
|
35
|
+
dev = [
|
|
36
|
+
"psycopg[binary]>=3.1.0",
|
|
37
|
+
"pytest>=7.0",
|
|
38
|
+
"pytest-xdist>=3.0",
|
|
39
|
+
"pytest-randomly>=3.0",
|
|
40
|
+
]
|
|
27
41
|
|
|
28
42
|
[project.urls]
|
|
29
43
|
Homepage = "https://github.com/varunchopra/postkit"
|
|
30
44
|
Repository = "https://github.com/varunchopra/postkit"
|
|
45
|
+
Documentation = "https://github.com/varunchopra/postkit/tree/main/docs"
|
|
46
|
+
Issues = "https://github.com/varunchopra/postkit/issues"
|
|
31
47
|
|
|
32
48
|
[build-system]
|
|
33
49
|
requires = ["hatchling"]
|