https://github.com/evgenyigumnov/fastpy-rs
FastPy-RS is a high-performance Python library that provides optimized implementations of common functions using Rust.
https://github.com/evgenyigumnov/fastpy-rs
performance pyo3 python rust
Last synced: 3 months ago
JSON representation
FastPy-RS is a high-performance Python library that provides optimized implementations of common functions using Rust.
- Host: GitHub
- URL: https://github.com/evgenyigumnov/fastpy-rs
- Owner: evgenyigumnov
- License: mit
- Created: 2025-06-22T07:03:46.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-08-19T03:18:12.000Z (11 months ago)
- Last Synced: 2025-12-15T07:24:53.203Z (7 months ago)
- Topics: performance, pyo3, python, rust
- Language: Python
- Homepage: https://pypi.org/project/fastpy-rs
- Size: 751 KB
- Stars: 16
- Watchers: 3
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# fastpy-rs
[](https://opensource.org/licenses/MIT)
[](https://badge.fury.io/py/fastpy-rs)

FastPy-RS is a high-performance Python library that provides optimized implementations of common functions using Rust. It's designed to be a collection of frequently used functions where performance matters, offering significant speed improvements over pure Python implementations.
## Features
- **Blazing Fast**: Leverages Rust's performance to provide significant speedups
- **Easy to Use**: Simple Python interface
- **Secure**: Written in Rust, ensuring high security
Documentation: [https://evgenyigumnov.github.io/fastpy-rs](https://evgenyigumnov.github.io/fastpy-rs)
### Usage
```python
import fastpy_rs as fr
# Using crypto functions
hash_result = fr.crypto.sha256_str("hello")
# Using data tools
# datatools.base64_encode / datatools.base64_decode
encoded = fr.datatools.base64_encode(b"hello")
decoded = fr.datatools.base64_decode("aGVsbG8=")
invalid_data = ' dict`
2. [x] `serialize_json(obj) -> str`
---
### 🌐 **HTTP / Networking**
11. [x] `get(url) -> str`
12. [ ] `http_post(url, data, headers=None) -> str`
13. [ ] `http_download(url, dest_path)`
14. [ ] `http_request(method, url, headers, body) -> (code, body)`
15. [ ] `fetch_json(url) -> dict`
16. [ ] `http_head(url) -> headers`
17. [ ] `http_retry_request(...)`
18. [ ] `http_stream_lines(url) -> Iterator[str]`
19. [ ] `http_check_redirect_chain(url) -> List[str]`
20. [ ] `http_measure_latency(url) -> float`
---
### 🔐 **Hashing / Crypto**
21. [x] `sha256(data: bytes | str) -> str`
22. [x] `md5(data: bytes | str) -> str`
23. [x] `hmac_sha256(key, message) -> str`
24. [x] `blake3_hash(data) -> str`
25. [x] `is_valid_sha256(hexstr: str) -> bool`
26. [x] `secure_compare(a: str, b: str) -> bool`
---
### 🧮 **Data Processing / Encoding**
27. [x] `base64_encode(data: bytes) -> str`
28. [x] `base64_decode(data: str) -> bytes`
29. [x] `gzip_compress(data: bytes) -> bytes`
30. [x] `gzip_decompress(data: bytes) -> bytes`
31. [x] `url_encode(str) -> str`
32. [x] `url_decode(str) -> str`
33. [ ] `csv_parse(csv_string) -> List[Dict]`
34. [ ] `csv_serialize(data: List[Dict]) -> str`
35. [ ] `bloom_filter_create(size: int, hash_funcs: int)`
36. [ ] `bloom_filter_check(item: str) -> bool`
---
### ⏱️ **Performance / Utils**
37. [x] `benchmark_fn(callable, *args, **kwargs) -> float`
38. [ ] `parallel_map(func, list, threads=4) -> list`
39. [ ] `fast_deduplication(list) -> list`
40. [ ] `sort_large_list(list) -> list`
41. [ ] `fuzzy_string_match(a, b) -> score`
42. [ ] `levenshtein_distance(a, b) -> int`
43. [ ] `tokenize_text(text: str) -> List[str]`
44. [ ] `fast_word_count(text: str) -> Dict[str, int]`
45. [x] `regex_search(pattern, text) -> List[str]`
46. [ ] `regex_replace(pattern, repl, text) -> str`
---
### 🧠 **AI/ML Preprocessing**
47. [ ] `normalize_vector(vec: List[float]) -> List[float]`
48. [ ] `cosine_similarity(vec1, vec2) -> float`
49. [x] `token_frequency(text: str) -> Dict[str, int]`
50. [ ] `encode_text_fast(text: str) -> List[int]`