https://github.com/itsmeadarsh2008/flpc
A Rust-based regex crate wrapper for Python3 to get faster performance. 👾
https://github.com/itsmeadarsh2008/flpc
maturin performance pyo3 python python3 regex regexp rust
Last synced: 29 days ago
JSON representation
A Rust-based regex crate wrapper for Python3 to get faster performance. 👾
- Host: GitHub
- URL: https://github.com/itsmeadarsh2008/flpc
- Owner: itsmeadarsh2008
- License: mit
- Created: 2024-06-14T12:46:08.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2024-07-09T12:18:01.000Z (10 months ago)
- Last Synced: 2025-03-30T04:08:30.208Z (about 1 month ago)
- Topics: maturin, performance, pyo3, python, python3, regex, regexp, rust
- Language: Python
- Homepage: https://pypi.org/project/flpc/
- Size: 37.1 KB
- Stars: 120
- Watchers: 4
- Forks: 3
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
![]()
# flpc: Lightning-Fast Python Regex





🚀 Supercharge your Python regex with Rust-powered performance!
## 🌟 Why flpc?
Being in experimental stage. The code structure and dependencies may change. If your project is using this. You will have to manually configure the migrations to latest versions.flpc is a powerful Python library that wraps the blazing-fast [Rust regex crate](https://crates.io/crates/regex), bringing enhanced speed to your regular expression operations. It's designed to be a drop-in replacement for Python's native `re` module, with some minor syntax differences.
## 🚀 Quick Start
1. Install flpc:
```
pip install flpc
```2. Use it in your code as shown in the API
## 🔧 API
flpc mirrors the `re` module's API, with a few small exceptions:
- Use `fmatch()` instead of `match()` (to avoid conflicts with Python's keyword)
- When using `group()` on a match object, always provide an index (e.g., `group(0)` for the entire match)Common functions include:
- `compile()`
- `search()`
- `findall()`
- `finditer()`
- `split()`
- `sub()`
- `subn()`## 💡 Pro Tips
- Pre-compile your patterns for faster execution
- Use raw strings (`r''`) for cleaner regex patterns
- Always check if a match is found before accessing groups
- Remember to use `group(0)` to get the entire match## 🤝 Contributing
We welcome contributions! Whether it's bug reports, feature requests, or code contributions, please feel free to reach out. Check our [contribution guidelines](CONTRIBUTING.md) to get started.
## 📄 License
flpc is open-source software licensed under the MIT license.