Skip to content

Commit

Permalink
feature/Changed README.md and add pypi index
Browse files Browse the repository at this point in the history
  • Loading branch information
WindowGenerator committed Feb 29, 2024
1 parent 08c7104 commit ad8c2bf
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 0 deletions.
44 changes: 44 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# Starlette Responses Kit
**starlette-responses-kit** is an extension for Starlette, providing a collection of custom responses designed to enhance and simplify the development of web applications and APIs. This toolkit expands on Starlette's built-in responses, offering more flexibility and functionality to handle various content types and response patterns more efficiently.

# Roadmap
- [ ] Custom File Responses: Simplify the process of serving files with enhanced control over content-disposition and content types.
- [ ] JSON File Response: Serve JSON content from files directly, optimizing for speed and memory usage.
- [x] Text and Bytes File Response: Offer explicit responses for text and binary content, providing a clear and concise way to handle different file types.
- [x] Async Support: Fully asynchronous responses, ensuring high performance and non-blocking I/O operations.
- [x] Easy Integration: Designed to seamlessly integrate with existing Starlette applications or FastAPI projects that use Starlette internally.
- [ ] Flexible and Extensible: Easily extend the kit with custom response types to suit your specific needs.

# Installation
Install starlette-responses-kit using pip:


```bash
pip install starlette-responses-kit
```

# Quick Start
Here's how to use one of the custom responses in a Starlette application:

```python
from starlette.applications import Starlette
from starlette.responses import PlainTextResponse
from starlette_responses_kit import TextFileResponse
from starlette.routing import Route

async def json_file_endpoint(request):
return TextFileResponse("some-text")

app = Starlette(
debug=True,
routes=[
Route("/text", json_file_endpoint),
],
)
```

# Contributing
Contributions are welcome! If you'd like to contribute, please fork the repository and use a feature branch. Pull requests are warmly welcome.

# License
starlette-responses-kit is released under the MIT License. See the bundled LICENSE file for details.
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -84,3 +84,6 @@ exclude_lines = [
"if __name__ == .__main__.:",
"if TYPE_CHECKING:",
]

[publish.index.repos.main]
url = "https://upload.pypi.org/legacy/"

0 comments on commit ad8c2bf

Please sign in to comment.