nox-nova 0.8.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.
- nox_nova-0.8.0/PKG-INFO +5 -0
- nox_nova-0.8.0/README.md +12 -0
- nox_nova-0.8.0/nox.json +14 -0
- nox_nova-0.8.0/pyproject.toml +27 -0
- nox_nova-0.8.0/src/lib.nox +49 -0
nox_nova-0.8.0/PKG-INFO
ADDED
nox_nova-0.8.0/README.md
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# nox-nova
|
|
2
|
+
|
|
3
|
+
Native Python (`CPython 3.15+` `abi3t`, free-threaded `3.15t`) bindings for [nova](https://github.com/mburakmmm/nova).
|
|
4
|
+
|
|
5
|
+
```python
|
|
6
|
+
import nox_nova
|
|
7
|
+
|
|
8
|
+
h = nox_nova.Headers()
|
|
9
|
+
h.set("Content-Type", "application/json")
|
|
10
|
+
assert h.get("content-type") == "application/json"
|
|
11
|
+
assert h.get("x-missing", default="fallback") == "fallback"
|
|
12
|
+
```
|
nox_nova-0.8.0/nox.json
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "nox_nova_bridge",
|
|
3
|
+
"version": "0.8.0",
|
|
4
|
+
"source": "nox",
|
|
5
|
+
"entry": "src/lib.nox",
|
|
6
|
+
"requires": [
|
|
7
|
+
{
|
|
8
|
+
"alias": "nova",
|
|
9
|
+
"repo": "https://github.com/mburakmmm/nova.git",
|
|
10
|
+
"ref": "88b2d40b3292ab597eade029465501bfb85a1fd8",
|
|
11
|
+
"require_signed_commit": false
|
|
12
|
+
}
|
|
13
|
+
]
|
|
14
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["noxpy>=0.7.0a2"]
|
|
3
|
+
build-backend = "noxpy.build"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "nox-nova"
|
|
7
|
+
version = "0.8.0"
|
|
8
|
+
description = "Native Python bindings (CPython 3.15+ abi3t, free-threaded) for Nova HTTP utilities"
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
license = { text = "MIT" }
|
|
11
|
+
requires-python = ">=3.15"
|
|
12
|
+
|
|
13
|
+
[tool.noxpy]
|
|
14
|
+
module-name = "nox_nova"
|
|
15
|
+
source = "src/lib.nox"
|
|
16
|
+
backend = "llvm"
|
|
17
|
+
abi = "abi3t"
|
|
18
|
+
free-threaded = true
|
|
19
|
+
generate-stubs = true
|
|
20
|
+
export = "public"
|
|
21
|
+
|
|
22
|
+
[tool.noxpy.publish]
|
|
23
|
+
enabled = true
|
|
24
|
+
repository = "pypi"
|
|
25
|
+
trigger = "release-tag"
|
|
26
|
+
include-sdist = true
|
|
27
|
+
require-attestation = true
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import nova.codec
|
|
2
|
+
import nova.headers
|
|
3
|
+
import nova.httpdate
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
@export("instance_locked")
|
|
7
|
+
class Headers:
|
|
8
|
+
_inner: nova.headers.Headers
|
|
9
|
+
|
|
10
|
+
def __init__(self) -> None:
|
|
11
|
+
self._inner = nova.headers.Headers()
|
|
12
|
+
|
|
13
|
+
def set(self, name: str, value: str) -> None:
|
|
14
|
+
self._inner.set(name, value)
|
|
15
|
+
|
|
16
|
+
def set_multi(self, name: str, values: list[str]) -> None:
|
|
17
|
+
self._inner.set_multi(name, values)
|
|
18
|
+
|
|
19
|
+
def get_all(self, name: str) -> list[str]:
|
|
20
|
+
return self._inner.get_all(name)
|
|
21
|
+
|
|
22
|
+
def get(self, name: str, default: str = "") -> str:
|
|
23
|
+
return self._inner.get(name, default)
|
|
24
|
+
|
|
25
|
+
def get_opt(self, name: str) -> str | None:
|
|
26
|
+
return self._inner.get_opt(name)
|
|
27
|
+
|
|
28
|
+
def has(self, name: str) -> bool:
|
|
29
|
+
return self._inner.has(name)
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
@export
|
|
33
|
+
def validate_header_entry(name: str, value: str) -> None:
|
|
34
|
+
nova.headers.validate_header_entry(name, value)
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
@export
|
|
38
|
+
def parse_http_date(s_in: str) -> int:
|
|
39
|
+
return nova.httpdate.parse_http_date(s_in)
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
@export
|
|
43
|
+
def days_from_civil(year: int, month: int, day: int) -> int:
|
|
44
|
+
return nova.httpdate.days_from_civil(year, month, day)
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
@export
|
|
48
|
+
def normalize_encoding(name: str) -> str:
|
|
49
|
+
return nova.codec.normalize_encoding(name)
|