wreq 0.1.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.
- wreq-0.1.0/Cargo.lock +171 -0
- wreq-0.1.0/Cargo.toml +12 -0
- wreq-0.1.0/PKG-INFO +7 -0
- wreq-0.1.0/pyproject.toml +15 -0
- wreq-0.1.0/src/lib.rs +14 -0
wreq-0.1.0/Cargo.lock
ADDED
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
# This file is automatically @generated by Cargo.
|
|
2
|
+
# It is not intended for manual editing.
|
|
3
|
+
version = 4
|
|
4
|
+
|
|
5
|
+
[[package]]
|
|
6
|
+
name = "autocfg"
|
|
7
|
+
version = "1.4.0"
|
|
8
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
9
|
+
checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26"
|
|
10
|
+
|
|
11
|
+
[[package]]
|
|
12
|
+
name = "cfg-if"
|
|
13
|
+
version = "1.0.0"
|
|
14
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
15
|
+
checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
|
|
16
|
+
|
|
17
|
+
[[package]]
|
|
18
|
+
name = "heck"
|
|
19
|
+
version = "0.5.0"
|
|
20
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
21
|
+
checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea"
|
|
22
|
+
|
|
23
|
+
[[package]]
|
|
24
|
+
name = "indoc"
|
|
25
|
+
version = "2.0.6"
|
|
26
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
27
|
+
checksum = "f4c7245a08504955605670dbf141fceab975f15ca21570696aebe9d2e71576bd"
|
|
28
|
+
|
|
29
|
+
[[package]]
|
|
30
|
+
name = "libc"
|
|
31
|
+
version = "0.2.172"
|
|
32
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
33
|
+
checksum = "d750af042f7ef4f724306de029d18836c26c1765a54a6a3f094cbd23a7267ffa"
|
|
34
|
+
|
|
35
|
+
[[package]]
|
|
36
|
+
name = "memoffset"
|
|
37
|
+
version = "0.9.1"
|
|
38
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
39
|
+
checksum = "488016bfae457b036d996092f6cb448677611ce4449e970ceaf42695203f218a"
|
|
40
|
+
dependencies = [
|
|
41
|
+
"autocfg",
|
|
42
|
+
]
|
|
43
|
+
|
|
44
|
+
[[package]]
|
|
45
|
+
name = "once_cell"
|
|
46
|
+
version = "1.21.3"
|
|
47
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
48
|
+
checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d"
|
|
49
|
+
|
|
50
|
+
[[package]]
|
|
51
|
+
name = "portable-atomic"
|
|
52
|
+
version = "1.11.0"
|
|
53
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
54
|
+
checksum = "350e9b48cbc6b0e028b0473b114454c6316e57336ee184ceab6e53f72c178b3e"
|
|
55
|
+
|
|
56
|
+
[[package]]
|
|
57
|
+
name = "proc-macro2"
|
|
58
|
+
version = "1.0.95"
|
|
59
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
60
|
+
checksum = "02b3e5e68a3a1a02aad3ec490a98007cbc13c37cbe84a3cd7b8e406d76e7f778"
|
|
61
|
+
dependencies = [
|
|
62
|
+
"unicode-ident",
|
|
63
|
+
]
|
|
64
|
+
|
|
65
|
+
[[package]]
|
|
66
|
+
name = "pyo3"
|
|
67
|
+
version = "0.24.2"
|
|
68
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
69
|
+
checksum = "e5203598f366b11a02b13aa20cab591229ff0a89fd121a308a5df751d5fc9219"
|
|
70
|
+
dependencies = [
|
|
71
|
+
"cfg-if",
|
|
72
|
+
"indoc",
|
|
73
|
+
"libc",
|
|
74
|
+
"memoffset",
|
|
75
|
+
"once_cell",
|
|
76
|
+
"portable-atomic",
|
|
77
|
+
"pyo3-build-config",
|
|
78
|
+
"pyo3-ffi",
|
|
79
|
+
"pyo3-macros",
|
|
80
|
+
"unindent",
|
|
81
|
+
]
|
|
82
|
+
|
|
83
|
+
[[package]]
|
|
84
|
+
name = "pyo3-build-config"
|
|
85
|
+
version = "0.24.2"
|
|
86
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
87
|
+
checksum = "99636d423fa2ca130fa5acde3059308006d46f98caac629418e53f7ebb1e9999"
|
|
88
|
+
dependencies = [
|
|
89
|
+
"once_cell",
|
|
90
|
+
"target-lexicon",
|
|
91
|
+
]
|
|
92
|
+
|
|
93
|
+
[[package]]
|
|
94
|
+
name = "pyo3-ffi"
|
|
95
|
+
version = "0.24.2"
|
|
96
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
97
|
+
checksum = "78f9cf92ba9c409279bc3305b5409d90db2d2c22392d443a87df3a1adad59e33"
|
|
98
|
+
dependencies = [
|
|
99
|
+
"libc",
|
|
100
|
+
"pyo3-build-config",
|
|
101
|
+
]
|
|
102
|
+
|
|
103
|
+
[[package]]
|
|
104
|
+
name = "pyo3-macros"
|
|
105
|
+
version = "0.24.2"
|
|
106
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
107
|
+
checksum = "0b999cb1a6ce21f9a6b147dcf1be9ffedf02e0043aec74dc390f3007047cecd9"
|
|
108
|
+
dependencies = [
|
|
109
|
+
"proc-macro2",
|
|
110
|
+
"pyo3-macros-backend",
|
|
111
|
+
"quote",
|
|
112
|
+
"syn",
|
|
113
|
+
]
|
|
114
|
+
|
|
115
|
+
[[package]]
|
|
116
|
+
name = "pyo3-macros-backend"
|
|
117
|
+
version = "0.24.2"
|
|
118
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
119
|
+
checksum = "822ece1c7e1012745607d5cf0bcb2874769f0f7cb34c4cde03b9358eb9ef911a"
|
|
120
|
+
dependencies = [
|
|
121
|
+
"heck",
|
|
122
|
+
"proc-macro2",
|
|
123
|
+
"pyo3-build-config",
|
|
124
|
+
"quote",
|
|
125
|
+
"syn",
|
|
126
|
+
]
|
|
127
|
+
|
|
128
|
+
[[package]]
|
|
129
|
+
name = "quote"
|
|
130
|
+
version = "1.0.40"
|
|
131
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
132
|
+
checksum = "1885c039570dc00dcb4ff087a89e185fd56bae234ddc7f056a945bf36467248d"
|
|
133
|
+
dependencies = [
|
|
134
|
+
"proc-macro2",
|
|
135
|
+
]
|
|
136
|
+
|
|
137
|
+
[[package]]
|
|
138
|
+
name = "syn"
|
|
139
|
+
version = "2.0.101"
|
|
140
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
141
|
+
checksum = "8ce2b7fc941b3a24138a0a7cf8e858bfc6a992e7978a068a5c760deb0ed43caf"
|
|
142
|
+
dependencies = [
|
|
143
|
+
"proc-macro2",
|
|
144
|
+
"quote",
|
|
145
|
+
"unicode-ident",
|
|
146
|
+
]
|
|
147
|
+
|
|
148
|
+
[[package]]
|
|
149
|
+
name = "target-lexicon"
|
|
150
|
+
version = "0.13.2"
|
|
151
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
152
|
+
checksum = "e502f78cdbb8ba4718f566c418c52bc729126ffd16baee5baa718cf25dd5a69a"
|
|
153
|
+
|
|
154
|
+
[[package]]
|
|
155
|
+
name = "unicode-ident"
|
|
156
|
+
version = "1.0.18"
|
|
157
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
158
|
+
checksum = "5a5f39404a5da50712a4c1eecf25e90dd62b613502b7e925fd4e4d19b5c96512"
|
|
159
|
+
|
|
160
|
+
[[package]]
|
|
161
|
+
name = "unindent"
|
|
162
|
+
version = "0.2.4"
|
|
163
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
164
|
+
checksum = "7264e107f553ccae879d21fbea1d6724ac785e8c3bfc762137959b5802826ef3"
|
|
165
|
+
|
|
166
|
+
[[package]]
|
|
167
|
+
name = "wreq"
|
|
168
|
+
version = "0.1.0"
|
|
169
|
+
dependencies = [
|
|
170
|
+
"pyo3",
|
|
171
|
+
]
|
wreq-0.1.0/Cargo.toml
ADDED
wreq-0.1.0/PKG-INFO
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["maturin>=1.8,<2.0"]
|
|
3
|
+
build-backend = "maturin"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "wreq"
|
|
7
|
+
requires-python = ">=3.8"
|
|
8
|
+
classifiers = [
|
|
9
|
+
"Programming Language :: Rust",
|
|
10
|
+
"Programming Language :: Python :: Implementation :: CPython",
|
|
11
|
+
"Programming Language :: Python :: Implementation :: PyPy",
|
|
12
|
+
]
|
|
13
|
+
dynamic = ["version"]
|
|
14
|
+
[tool.maturin]
|
|
15
|
+
features = ["pyo3/extension-module"]
|
wreq-0.1.0/src/lib.rs
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
use pyo3::prelude::*;
|
|
2
|
+
|
|
3
|
+
/// Formats the sum of two numbers as string.
|
|
4
|
+
#[pyfunction]
|
|
5
|
+
fn sum_as_string(a: usize, b: usize) -> PyResult<String> {
|
|
6
|
+
Ok((a + b).to_string())
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
/// A Python module implemented in Rust.
|
|
10
|
+
#[pymodule]
|
|
11
|
+
fn wreq(m: &Bound<'_, PyModule>) -> PyResult<()> {
|
|
12
|
+
m.add_function(wrap_pyfunction!(sum_as_string, m)?)?;
|
|
13
|
+
Ok(())
|
|
14
|
+
}
|