Skip to content

Commit 865ea8e

Browse files
committed
update README
1 parent c2093b5 commit 865ea8e

File tree

1 file changed

+11
-18
lines changed

1 file changed

+11
-18
lines changed

README.md

Lines changed: 11 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,10 @@ Lightbug is a simple and sweet HTTP framework for Mojo that builds on best pract
2929
This is not production ready yet. We're aiming to keep up with new developments in Mojo, but it might take some time to get to a point when this is safe to use in real-world applications.
3030

3131
Lightbug currently has the following features:
32-
- [x] Pure Mojo networking! No dependencies on Python by default
33-
- [x] TCP-based server and client implementation
34-
- [x] Assign your own custom handler to a route
35-
- [x] Craft HTTP requests and responses with built-in primitives
36-
- [x] Everything is fully typed, with no `def` functions used
32+
- [x] Pure Mojo! No Python dependencies. Everything is fully typed, with no `def` functions used
33+
- [x] HTTP Server and Client implementations
34+
- [x] TCP and UDP support
35+
- [x] Cookie support
3736

3837
### Check Out These Mojo Libraries:
3938

@@ -200,19 +199,15 @@ from lightbug_http import *
200199
from lightbug_http.client import Client
201200
202201
fn test_request(mut client: Client) raises -> None:
203-
var uri = URI.parse_raises("http://httpbin.org/status/404")
204-
var headers = Header("Host", "httpbin.org")
205-
202+
var uri = URI.parse("google.com")
203+
var headers = Headers(Header("Host", "google.com"))
206204
var request = HTTPRequest(uri, headers)
207205
var response = client.do(request^)
208206
209207
# print status code
210208
print("Response:", response.status_code)
211209
212-
# print parsed headers (only some are parsed for now)
213-
print("Content-Type:", response.headers["Content-Type"])
214-
print("Content-Length", response.headers["Content-Length"])
215-
print("Server:", to_string(response.headers["Server"]))
210+
print(response.headers)
216211
217212
print(
218213
"Is connection set to connection-close? ", response.connection_close()
@@ -252,19 +247,17 @@ Note: as of September, 2024, `PythonServer` and `PythonClient` throw a compilati
252247

253248
We're working on support for the following (contributors welcome!):
254249

255-
- [ ] [WebSocket Support](https://github.com/saviorand/lightbug_http/pull/57)
250+
- [ ] [JSON support](https://github.com/saviorand/lightbug_http/issues/4)
251+
- [ ] Complete HTTP/1.x support compliant with RFC 9110/9112 specs (see issues)
256252
- [ ] [SSL/HTTPS support](https://github.com/saviorand/lightbug_http/issues/20)
257-
- [ ] UDP support
258-
- [ ] [Better error handling](https://github.com/saviorand/lightbug_http/issues/3), [improved form/multipart and JSON support](https://github.com/saviorand/lightbug_http/issues/4)
259253
- [ ] [Multiple simultaneous connections](https://github.com/saviorand/lightbug_http/issues/5), [parallelization and performance optimizations](https://github.com/saviorand/lightbug_http/issues/6)
260254
- [ ] [HTTP 2.0/3.0 support](https://github.com/saviorand/lightbug_http/issues/8)
261-
- [ ] [ASGI spec conformance](https://github.com/saviorand/lightbug_http/issues/17)
262255

263256
The plan is to get to a feature set similar to Python frameworks like [Starlette](https://github.com/encode/starlette), but with better performance.
264257

265258
Our vision is to develop three libraries, with `lightbug_http` (this repo) as a starting point:
266-
- `lightbug_http` - HTTP infrastructure and basic API development
267-
- `lightbug_api` - (coming later in 2024!) Tools to make great APIs fast, with support for OpenAPI spec and domain driven design
259+
- `lightbug_http` - Lightweight and simple HTTP framework, basic networking primitives
260+
- [`lightbug_api`](https://github.com/saviorand/lightbug_api) - Tools to make great APIs fast, with OpenAPI support and automated docs
268261
- `lightbug_web` - (release date TBD) Full-stack web framework for Mojo, similar to NextJS or SvelteKit
269262

270263
The idea is to get to a point where the entire codebase of a simple modern web application can be written in Mojo.

0 commit comments

Comments
 (0)