workers-runtime-sdk 1.1.6__tar.gz → 1.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.
Files changed (17) hide show
  1. {workers_runtime_sdk-1.1.6 → workers_runtime_sdk-1.2.0}/CHANGELOG.md +8 -0
  2. {workers_runtime_sdk-1.1.6 → workers_runtime_sdk-1.2.0}/PKG-INFO +1 -1
  3. {workers_runtime_sdk-1.1.6 → workers_runtime_sdk-1.2.0}/pyproject.toml +1 -1
  4. {workers_runtime_sdk-1.1.6 → workers_runtime_sdk-1.2.0}/src/workers/_workers.py +14 -0
  5. {workers_runtime_sdk-1.1.6 → workers_runtime_sdk-1.2.0}/.gitignore +0 -0
  6. {workers_runtime_sdk-1.1.6 → workers_runtime_sdk-1.2.0}/AGENTS.md +0 -0
  7. {workers_runtime_sdk-1.1.6 → workers_runtime_sdk-1.2.0}/README.md +0 -0
  8. {workers_runtime_sdk-1.1.6 → workers_runtime_sdk-1.2.0}/src/_cloudflare_compat_flags.pyi +0 -0
  9. {workers_runtime_sdk-1.1.6 → workers_runtime_sdk-1.2.0}/src/_pyodide_entrypoint_helper.pyi +0 -0
  10. {workers_runtime_sdk-1.1.6 → workers_runtime_sdk-1.2.0}/src/_workers_sdk_entropy_import_context.pth +0 -0
  11. {workers_runtime_sdk-1.1.6 → workers_runtime_sdk-1.2.0}/src/_workers_sdk_entropy_import_context.py +0 -0
  12. {workers_runtime_sdk-1.1.6 → workers_runtime_sdk-1.2.0}/src/_workers_sdk_entropy_import_context_loader.py +0 -0
  13. {workers_runtime_sdk-1.1.6 → workers_runtime_sdk-1.2.0}/src/asgi.py +0 -0
  14. {workers_runtime_sdk-1.1.6 → workers_runtime_sdk-1.2.0}/src/workers/__init__.py +0 -0
  15. {workers_runtime_sdk-1.1.6 → workers_runtime_sdk-1.2.0}/src/workers/py.typed +0 -0
  16. {workers_runtime_sdk-1.1.6 → workers_runtime_sdk-1.2.0}/src/workers/workflows.py +0 -0
  17. {workers_runtime_sdk-1.1.6 → workers_runtime_sdk-1.2.0}/uv.lock +0 -0
@@ -2,6 +2,14 @@
2
2
 
3
3
  <!-- version list -->
4
4
 
5
+ ## v1.2.0 (2026-06-12)
6
+
7
+ ### Features
8
+
9
+ - Implements cf accessor on Request
10
+ ([`5777f80`](https://github.com/cloudflare/workers-py/commit/5777f80ead8d9a3c452fe3b6b8f2dc041d6c80d3))
11
+
12
+
5
13
  ## v1.1.6 (2026-05-28)
6
14
 
7
15
  ### Bug Fixes
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: workers-runtime-sdk
3
- Version: 1.1.6
3
+ Version: 1.2.0
4
4
  Summary: Python SDK for Cloudflare Workers
5
5
  Project-URL: Homepage, https://github.com/cloudflare/workers-py
6
6
  Project-URL: Bug Tracker, https://github.com/cloudflare/workers-py/issues
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "workers-runtime-sdk"
7
- version = "1.1.6"
7
+ version = "1.2.0"
8
8
  description = "Python SDK for Cloudflare Workers"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.12"
@@ -769,6 +769,20 @@ class Request:
769
769
  def body_used(self) -> bool:
770
770
  return self.js_object.bodyUsed
771
771
 
772
+ @property
773
+ def cf(self) -> "JsProxy | None":
774
+ """
775
+ Cloudflare-specific properties about the incoming request
776
+ (IncomingRequestCfProperties). Access fields via attribute
777
+ notation, for example ``request.cf.colo``.
778
+
779
+ Returns None when not present (for example, in the dashboard/playground
780
+ preview or for requests constructed without a ``cf`` value).
781
+
782
+ See https://developers.cloudflare.com/workers/runtime-apis/request/#incomingrequestcfproperties
783
+ """
784
+ return _jsnull_to_none(self.js_object.cf)
785
+
772
786
  @property
773
787
  def cache(self) -> str:
774
788
  return self.js_object.cache