can-ada 1.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.
can_ada-1.0.4/PKG-INFO ADDED
@@ -0,0 +1,50 @@
1
+ Metadata-Version: 2.1
2
+ Name: can_ada
3
+ Version: 1.0.4
4
+ Summary: Ada is a fast spec-compliant url parser
5
+ Home-page: https://github.com/tktech/can-ada
6
+ Author: Tyler Kennedy
7
+ Author-email: tk@tkte.ch
8
+ Requires-Python: >=3.7
9
+ Description-Content-Type: text/markdown
10
+ Provides-Extra: test
11
+
12
+ # can_ada
13
+
14
+ Python bindings for [Ada][], a fast and spec-compliant URL parser.
15
+
16
+ ## Installation
17
+
18
+ ```bash
19
+ pip install can_ada
20
+ ```
21
+
22
+ Binary wheels are available for most platforms. If not available, a
23
+ C++17-or-greater compiler will be required to build the underlying Ada library.
24
+
25
+ ## Usage
26
+
27
+ Parsing is simple:
28
+
29
+ ```python
30
+ from can_ada import parse
31
+
32
+ url = parse("https://tkte.ch/search?q=canada")
33
+ print(url.protocol) # https:
34
+ print(url.host) # tkte.ch
35
+ print(url.pathname) # /search
36
+ print(url.search) # ?q=canada
37
+ ```
38
+
39
+ You can also modify URLs:
40
+
41
+ ```python
42
+ from can_ada import parse
43
+
44
+ url = parse("https://tkte.ch/search?q=canada")
45
+ url.host = "google.com"
46
+ url.search = "?q=canada&safe=off"
47
+ print(url) # https://google.com/search?q=canada&safe=off
48
+ ```
49
+
50
+ [Ada]: https://ada-url.com/
@@ -0,0 +1,39 @@
1
+ # can_ada
2
+
3
+ Python bindings for [Ada][], a fast and spec-compliant URL parser.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ pip install can_ada
9
+ ```
10
+
11
+ Binary wheels are available for most platforms. If not available, a
12
+ C++17-or-greater compiler will be required to build the underlying Ada library.
13
+
14
+ ## Usage
15
+
16
+ Parsing is simple:
17
+
18
+ ```python
19
+ from can_ada import parse
20
+
21
+ url = parse("https://tkte.ch/search?q=canada")
22
+ print(url.protocol) # https:
23
+ print(url.host) # tkte.ch
24
+ print(url.pathname) # /search
25
+ print(url.search) # ?q=canada
26
+ ```
27
+
28
+ You can also modify URLs:
29
+
30
+ ```python
31
+ from can_ada import parse
32
+
33
+ url = parse("https://tkte.ch/search?q=canada")
34
+ url.host = "google.com"
35
+ url.search = "?q=canada&safe=off"
36
+ print(url) # https://google.com/search?q=canada&safe=off
37
+ ```
38
+
39
+ [Ada]: https://ada-url.com/
@@ -0,0 +1,50 @@
1
+ Metadata-Version: 2.1
2
+ Name: can-ada
3
+ Version: 1.0.4
4
+ Summary: Ada is a fast spec-compliant url parser
5
+ Home-page: https://github.com/tktech/can-ada
6
+ Author: Tyler Kennedy
7
+ Author-email: tk@tkte.ch
8
+ Requires-Python: >=3.7
9
+ Description-Content-Type: text/markdown
10
+ Provides-Extra: test
11
+
12
+ # can_ada
13
+
14
+ Python bindings for [Ada][], a fast and spec-compliant URL parser.
15
+
16
+ ## Installation
17
+
18
+ ```bash
19
+ pip install can_ada
20
+ ```
21
+
22
+ Binary wheels are available for most platforms. If not available, a
23
+ C++17-or-greater compiler will be required to build the underlying Ada library.
24
+
25
+ ## Usage
26
+
27
+ Parsing is simple:
28
+
29
+ ```python
30
+ from can_ada import parse
31
+
32
+ url = parse("https://tkte.ch/search?q=canada")
33
+ print(url.protocol) # https:
34
+ print(url.host) # tkte.ch
35
+ print(url.pathname) # /search
36
+ print(url.search) # ?q=canada
37
+ ```
38
+
39
+ You can also modify URLs:
40
+
41
+ ```python
42
+ from can_ada import parse
43
+
44
+ url = parse("https://tkte.ch/search?q=canada")
45
+ url.host = "google.com"
46
+ url.search = "?q=canada&safe=off"
47
+ print(url) # https://google.com/search?q=canada&safe=off
48
+ ```
49
+
50
+ [Ada]: https://ada-url.com/
@@ -0,0 +1,12 @@
1
+ README.md
2
+ pyproject.toml
3
+ setup.py
4
+ can_ada.egg-info/PKG-INFO
5
+ can_ada.egg-info/SOURCES.txt
6
+ can_ada.egg-info/dependency_links.txt
7
+ can_ada.egg-info/not-zip-safe
8
+ can_ada.egg-info/requires.txt
9
+ can_ada.egg-info/top_level.txt
10
+ src/ada.cpp
11
+ src/binding.cpp
12
+ tests/test_parsing.py
@@ -0,0 +1,3 @@
1
+
2
+ [test]
3
+ pytest
@@ -0,0 +1 @@
1
+ can_ada
@@ -0,0 +1,6 @@
1
+ [build-system]
2
+ requires = [
3
+ "setuptools>=42",
4
+ "pybind11>=2.10.0",
5
+ ]
6
+ build-backend = "setuptools.build_meta"
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
can_ada-1.0.4/setup.py ADDED
@@ -0,0 +1,35 @@
1
+ from setuptools import setup
2
+ from pybind11.setup_helpers import Pybind11Extension
3
+
4
+ __version__ = "1.0.4"
5
+
6
+ setup(
7
+ name="can_ada",
8
+ version=__version__,
9
+ author="Tyler Kennedy",
10
+ author_email="tk@tkte.ch",
11
+ long_description_content_type="text/markdown",
12
+ long_description=open("README.md").read(),
13
+ url="https://github.com/tktech/can-ada",
14
+ description="Ada is a fast spec-compliant url parser",
15
+ ext_modules=[
16
+ Pybind11Extension(
17
+ "can_ada",
18
+ sorted(["src/binding.cpp", "src/ada.cpp"]),
19
+ define_macros=[("VERSION_INFO", __version__)],
20
+ language='c++',
21
+ cxx_std=17
22
+ ),
23
+ ],
24
+ package_data={
25
+ "can_ada": [
26
+ "py.typed",
27
+ "can_ada.pyi"
28
+ ]
29
+ },
30
+ extras_require={
31
+ "test": "pytest"
32
+ },
33
+ zip_safe=False,
34
+ python_requires=">=3.7",
35
+ )