fix: flatten React Router structure — no nested Routes, each page is a top-level route

This commit is contained in:
enzo
2026-07-22 19:21:29 +08:00
parent 07ff8c2a12
commit 1de5fcf698
3720 changed files with 1254827 additions and 49 deletions
@@ -0,0 +1,104 @@
Metadata-Version: 2.4
Name: fastar
Version: 0.11.0
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Rust
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Python :: Implementation :: PyPy
Classifier: Topic :: Software Development :: Libraries
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Typing :: Typed
License-File: LICENSE
Summary: High-level bindings for the Rust tar crate
Author-email: Jonathan Ehwald <github@ehwald.info>
License-Expression: MIT
Requires-Python: >=3.8
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
Project-URL: documentation, https://github.com/DoctorJohn/fastar
Project-URL: homepage, https://github.com/DoctorJohn/fastar
Project-URL: repository, https://github.com/DoctorJohn/fastar
# Fastar
[![Versions][versions-image]][versions-url]
[![PyPI][pypi-image]][pypi-url]
[![Downloads][downloads-image]][downloads-url]
[![License][license-image]][license-url]
[![CodSpeed][codspeed-image]][codspeed-url]
[versions-image]: https://img.shields.io/pypi/pyversions/fastar
[versions-url]: https://github.com/DoctorJohn/fastar/blob/main/pyproject.toml
[pypi-image]: https://img.shields.io/pypi/v/fastar
[pypi-url]: https://pypi.org/project/fastar/
[downloads-image]: https://img.shields.io/pypi/dm/fastar
[downloads-url]: https://pypistats.org/packages/fastar
[license-image]: https://img.shields.io/pypi/l/fastar
[license-url]: https://github.com/DoctorJohn/fastar/blob/main/LICENSE
[codspeed-image]: https://img.shields.io/endpoint?url=https://codspeed.io/badge.json
[codspeed-url]: https://codspeed.io/DoctorJohn/fastar
The `fastar` library wraps the Rust [tar](https://crates.io/crates/tar), [flate2](https://crates.io/crates/flate2), and [zstd](https://crates.io/crates/zstd) crates, providing a high-performance way to work with compressed and uncompressed tar archives in Python.
## Installation
```sh
pip install fastar
```
## Usage
This section shows basic examples of how to create and extract tar archives using Fastar. For more usage examples, please refer directly to the test cases in the [tests](https://github.com/DoctorJohn/fastar/tree/main/tests) directory.
```python
import fastar
from pathlib import Path
input_file = Path("file.txt")
input_file.write_text("Hello, Fastar!")
with fastar.open("archive.tar", "w") as archive:
archive.append(input_file)
with fastar.open("archive.tar", "r") as archive:
archive.unpack("output/")
unpacked_file = Path("output/file.txt")
print(unpacked_file.read_text()) # Hello, Fastar!
```
### Opening Modes
The `fastar.open` method supports the following modes:
| Mode | Action | Compression |
| ------------- | ------------- | ------------------------- |
| `"w"` | Write | None |
| `"w:gz"` | Write | Gzip |
| `"w:zst"` | Write | Zstandard |
| `"r"` | Read | Automatically detected |
| `"r:"` | Read | None |
| `"r:gz"` | Read | Gzip |
| `"r:zst"` | Read | Zstandard |
## Development
1. Install dependencies into a virtual env: `uv sync`
2. Make changes to the code and tests
3. Build the package: `uv run maturin develop`
4. Run the tests: `uv run pytest`
@@ -0,0 +1,11 @@
fastar-0.11.0.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4
fastar-0.11.0.dist-info/METADATA,sha256=QLFKLBhzxPs9WzATdI47-cDWq-z6-NiHOiNL_tTa_CM,4002
fastar-0.11.0.dist-info/RECORD,,
fastar-0.11.0.dist-info/WHEEL,sha256=F6wS_EyyTApAlVDO0HV37reS5C0BQB3Ecd85S9pKlHg,147
fastar-0.11.0.dist-info/licenses/LICENSE,sha256=rYGQpMiiUoV5IPve_SRv0E-Ci8BMj0TaNs5jSu3d6xo,1054
fastar-0.11.0.dist-info/sboms/fastar.cyclonedx.json,sha256=6ZZ6hkmhr8s5hV0qglV-ew-tHWlB8CaFASVXV_cUduM,40657
fastar/__init__.py,sha256=mU2iZJ--coorw9PWKBK1JbU9C_N5EqCZQ-b7YvPFBWw,107
fastar/__init__.pyi,sha256=zRPy0m_xCi7K5B9XtclfbmysJUfHg4NJzPZS0OqTb30,5482
fastar/__pycache__/__init__.cpython-312.pyc,,
fastar/fastar.cpython-312-x86_64-linux-gnu.so,sha256=vfgngvIUCFDlbNA-7QBmGyTinGc3pZcuoEYK65DrlEc,1930392
fastar/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -0,0 +1,5 @@
Wheel-Version: 1.0
Generator: maturin (1.13.1)
Root-Is-Purelib: false
Tag: cp312-cp312-manylinux_2_17_x86_64
Tag: cp312-cp312-manylinux2014_x86_64
@@ -0,0 +1,7 @@
Copyright 2025 Jonathan Ehwald
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.