You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+88-9Lines changed: 88 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,6 +11,36 @@ Links to the original library
11
11
Unlike the typescript library all 3 of llparse's libraries were combined in this version of the code for the sake of portability...
12
12
I ended up mentioning how I did this a while back and I also had a concept for a C parser as well but I just didn't like it and I ended up using this instead but I also learned typescript as a bonus and It was alot of fun for me. I don't plan to make this into a real pypi library yet but I also didn't want to take away from the magic of the original source code that I borrowed from...
13
13
14
+
# Looking back on my dead work 2 years later
15
+
I had this idea lay somewhat dormant for 2 years and now seeing that I wanted to write a new socks5 server parser writing it in python
16
+
just made a little bit more sense to me, this way I don't have to stress over typescript or needing to relearn things I learned over 2 years ago.
17
+
I have now made this project public on pypi for anybody who wanted to dig into it and access the code
18
+
or generate your own parsers for C.
19
+
20
+
If your better at typescript. I reccommend sticking to the typescript version, no pressure. This library aims to not compete
21
+
with llparse but to act as an alternative for users who prefer python over typescript/node-js, simillar to puppeteer or pyppeteer.
22
+
Personally maybe we should make a rust crate for a rust version or at least someone will do it.
23
+
24
+
25
+
## Warnings
26
+
- It should be safe enough to generate code and stress-test it but if something doesn't seem right to you, be sure to throw an issue and share a typescript version of something that works in typescript but not in python, this way something unintended by the typescript developers can be solved.
27
+
- Some code may look unfinished or may need further internal refactoring/polishing and with the other things I want to go out and do
28
+
such as contributions to aiohttp and it's other libraries, cyares, winloop, aiothreading, aiocallback & deprecated-params and I also have an irl Part-time Job, ideas and pull requests are welcomed without hesitation. I maintain other projects listed above to prevent myself from experiencing burnout.
29
+
- Pytest testsuite has not been made yet. If this is a concern to you, please throw an issue on github. (Pytests and new workflows soon!)
30
+
- Some code might be spaghetti-code (because It's been 2 years since I touched much of the code if not at all)
31
+
e.g. tests module should be moved away from the library into the github repo.
32
+
- There's some research portions such as tools to help generate things for cython or tools to make mirrors of llhttp's code
33
+
such as it's native c code (I was looking to see if it could be theoretically autogenerated). Feel free to use them but
34
+
do it at your own risk. They maybe incompleted or not throughly stress-tested.
35
+
36
+
## New Features
37
+
- Throw me an issue if typescript llparse introduces something new that you want for me or another contributor to try and implement
38
+
just seeing llparse add new features is nothing but exciting to me.
39
+
40
+
- If you want a feature that typescript llparse doesn't have, be sure to try making a pull request over there as well and not just here,
41
+
there's a good chance they will appericate you for helping over there too and your helping make llhttp better by doing so. :)
42
+
43
+
14
44
# Why Did I Translate llparse to python?
15
45
- I wanted to work with a langauge I was more familiar with
16
46
- Better educate myself and others on how these great libraries like llhttp are made
@@ -29,12 +59,61 @@ Unlike llparse in typescript, this version has more integrated and experimental
29
59
I've added a few other things like the dot compiler from llparse_dot and I also made a brand new cython compiler
30
60
for it making easy and simple to make pxd files to port your projects to cython
31
61
32
-
# TODOS
33
-
- Make a script to compile projects to node-js by making a .gyp file for them...
34
-
- Make a script for compiling C files to `.lib` and `.dll` extensions as well as the `.a / .so` files seen on Linux and Apple Systems...
35
-
- Add in additional debuggers
36
-
- Make a youtube tutorial on how to use this library on Vizonex Builds
37
-
- Release pypi packages
38
-
- Build an enum compiler like seen in llhttp
39
-
- Implement llvm bytecode and js outputs if I have the time for it.
40
-
62
+
63
+
64
+
## How to use
65
+
```python
66
+
# The good old http_parser was borrowed from llparse.org to demonstrate this for you :)
0 commit comments