We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fce0430 commit d039cb2Copy full SHA for d039cb2
1 file changed
README.md
@@ -63,6 +63,35 @@ async def main():
63
asyncio.run(main())
64
```
65
66
+## URL Utilities
67
+
68
+RedC includes a high-performance URL parser powered by libcurl.
69
70
+```python
71
+from redc import CurlURL
72
73
+u = CurlURL("https://user:pass@example.com:8080/path?q=1#frag")
74
75
+print(u.host) # example.com
76
+print(u.port) # 8080
77
+print(u.path) # /path
78
79
+u.query = None
80
+u["port"] = 443
81
82
+print(str(u))
83
+# https://user:pass@example.com:443/path#frag
84
+```
85
86
+Validate URLs:
87
88
89
90
91
+print(CurlURL.is_valid_url("https://example.com")) # True
92
+print(CurlURL.is_valid_url("::::invalid::::")) # False
93
94
95
## License
96
97
MIT [LICENSE](https://github.com/AYMENJD/redc/blob/main/LICENSE)
0 commit comments