bencode-rs 0.0.3__tar.gz → 0.0.4__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.
- {bencode_rs-0.0.3 → bencode_rs-0.0.4}/PKG-INFO +11 -2
- {bencode_rs-0.0.3 → bencode_rs-0.0.4}/pyproject.toml +1 -4
- bencode_rs-0.0.4/readme.md +26 -0
- bencode_rs-0.0.3/readme.md +0 -17
- {bencode_rs-0.0.3 → bencode_rs-0.0.4}/.coveragerc +0 -0
- {bencode_rs-0.0.3 → bencode_rs-0.0.4}/.gitattributes +0 -0
- {bencode_rs-0.0.3 → bencode_rs-0.0.4}/.github/renovate.json +0 -0
- {bencode_rs-0.0.3 → bencode_rs-0.0.4}/.github/workflows/_build_wheels.yaml +0 -0
- {bencode_rs-0.0.3 → bencode_rs-0.0.4}/.github/workflows/ci.yaml +0 -0
- {bencode_rs-0.0.3 → bencode_rs-0.0.4}/.github/workflows/release.yaml +0 -0
- {bencode_rs-0.0.3 → bencode_rs-0.0.4}/.gitignore +0 -0
- {bencode_rs-0.0.3 → bencode_rs-0.0.4}/Cargo.lock +0 -0
- {bencode_rs-0.0.3 → bencode_rs-0.0.4}/Cargo.toml +0 -0
- {bencode_rs-0.0.3 → bencode_rs-0.0.4}/LICENSE +0 -0
- {bencode_rs-0.0.3 → bencode_rs-0.0.4}/bencode_rs/__init__.py +0 -0
- {bencode_rs-0.0.3 → bencode_rs-0.0.4}/bencode_rs/__init__.pyi +0 -0
- {bencode_rs-0.0.3 → bencode_rs-0.0.4}/leak.py +0 -0
- {bencode_rs-0.0.3 → bencode_rs-0.0.4}/requirements.txt +0 -0
- {bencode_rs-0.0.3 → bencode_rs-0.0.4}/rustfmt.toml +0 -0
- {bencode_rs-0.0.3 → bencode_rs-0.0.4}/src/decode.rs +0 -0
- {bencode_rs-0.0.3 → bencode_rs-0.0.4}/src/encode.rs +0 -0
- {bencode_rs-0.0.3 → bencode_rs-0.0.4}/src/lib.rs +0 -0
- {bencode_rs-0.0.3 → bencode_rs-0.0.4}/tests/fixtures/56507.torrent.bin +0 -0
- {bencode_rs-0.0.3 → bencode_rs-0.0.4}/tests/fixtures/ubuntu-22.04.2-desktop-amd64.iso.torrent.bin +0 -0
- {bencode_rs-0.0.3 → bencode_rs-0.0.4}/tests/test_1_encode.py +0 -0
- {bencode_rs-0.0.3 → bencode_rs-0.0.4}/tests/test_2_decode.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: bencode-rs
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.4
|
|
4
4
|
Classifier: Development Status :: 2 - Pre-Alpha
|
|
5
5
|
Classifier: License :: OSI Approved :: MIT License
|
|
6
6
|
Classifier: Programming Language :: Rust
|
|
@@ -12,7 +12,7 @@ Requires-Python: >=3.8, <4.0
|
|
|
12
12
|
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
|
|
13
13
|
Project-URL: Homepage, https://github.com/trim21/bencode-rs
|
|
14
14
|
|
|
15
|
-
# A bencode serialize/deserialize library
|
|
15
|
+
# A bencode serialize/deserialize library written in Rust with pyo3
|
|
16
16
|
|
|
17
17
|
## install
|
|
18
18
|
|
|
@@ -30,3 +30,12 @@ assert bencode_rs.bdecode(b"d4:spaml1:a1:bee") == {b"spam": [b"a", b"b"]}
|
|
|
30
30
|
assert bencode_rs.bencode({'hello': 'world'}) == b'd5:hello5:worlde'
|
|
31
31
|
```
|
|
32
32
|
|
|
33
|
+
## Notice
|
|
34
|
+
|
|
35
|
+
### decoding
|
|
36
|
+
there is no str/string in bencode, only bytes.
|
|
37
|
+
so we decode bencode bytes to python bytes, since it may not be a utf8 string.
|
|
38
|
+
|
|
39
|
+
### encoding
|
|
40
|
+
we encode python `True` as int `1` and `False` as int 0.
|
|
41
|
+
|
|
@@ -4,7 +4,7 @@ build-backend = "maturin"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "bencode-rs"
|
|
7
|
-
version = "0.0.
|
|
7
|
+
version = "0.0.4"
|
|
8
8
|
requires-python = ">=3.8,<4.0"
|
|
9
9
|
description = "a bencode parser binding build with pyo3"
|
|
10
10
|
readme = "readme.md"
|
|
@@ -26,6 +26,3 @@ Homepage = 'https://github.com/trim21/bencode-rs'
|
|
|
26
26
|
[tool.maturin]
|
|
27
27
|
features = ["pyo3/extension-module"]
|
|
28
28
|
module-name = "bencode_rs._bencode"
|
|
29
|
-
|
|
30
|
-
[tool.cibuildwheel]
|
|
31
|
-
skip = ["pp*", "*-musllinux_i686"]
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# A bencode serialize/deserialize library written in Rust with pyo3
|
|
2
|
+
|
|
3
|
+
## install
|
|
4
|
+
|
|
5
|
+
```shell
|
|
6
|
+
pip install bencode-rs
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
## basic usage
|
|
10
|
+
|
|
11
|
+
```python
|
|
12
|
+
import bencode_rs
|
|
13
|
+
|
|
14
|
+
assert bencode_rs.bdecode(b"d4:spaml1:a1:bee") == {b"spam": [b"a", b"b"]}
|
|
15
|
+
|
|
16
|
+
assert bencode_rs.bencode({'hello': 'world'}) == b'd5:hello5:worlde'
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Notice
|
|
20
|
+
|
|
21
|
+
### decoding
|
|
22
|
+
there is no str/string in bencode, only bytes.
|
|
23
|
+
so we decode bencode bytes to python bytes, since it may not be a utf8 string.
|
|
24
|
+
|
|
25
|
+
### encoding
|
|
26
|
+
we encode python `True` as int `1` and `False` as int 0.
|
bencode_rs-0.0.3/readme.md
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
# A bencode serialize/deserialize library writte in Rust
|
|
2
|
-
|
|
3
|
-
## install
|
|
4
|
-
|
|
5
|
-
```shell
|
|
6
|
-
pip install bencode-rs
|
|
7
|
-
```
|
|
8
|
-
|
|
9
|
-
## basic usage
|
|
10
|
-
|
|
11
|
-
```python
|
|
12
|
-
import bencode_rs
|
|
13
|
-
|
|
14
|
-
assert bencode_rs.bdecode(b"d4:spaml1:a1:bee") == {b"spam": [b"a", b"b"]}
|
|
15
|
-
|
|
16
|
-
assert bencode_rs.bencode({'hello': 'world'}) == b'd5:hello5:worlde'
|
|
17
|
-
```
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{bencode_rs-0.0.3 → bencode_rs-0.0.4}/tests/fixtures/ubuntu-22.04.2-desktop-amd64.iso.torrent.bin
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|