Next-generation web framework Teo, supports Node.js, Python and Rust
teodev.io
teodev.io
I think you can position the product better. The hero text is "Next-generation web framework for Rust, Node.js and Python.". This doesn't convey much to me. Is this a framework that works for all these languages? And most importantly, why would a developer use Teo over native frameworks for each of these languages.
Nit: I'd change "Working in progress" to "Work in progress", it's more common to see the latter wording.
Something I'm missing from all these automatic API generation frameworks from schema is having different complex data validation rules for creating, updating and eventually deleting. It is nice to put simple data type constraints on fields, but is infinitely more useful to have a DSL that can express complex logic: field X cannot be Z when field Y and W have value V and U respectively. Or when mass inserting/updating validating that the aggregate of input field Z is greater than X or the aggregate is not already in DB. Same thing for relationship.
Laravel validation rules is the closest that comes to this kind of input validation, but Laravel doesn't provide automatic API generation.
At the same time, there's an ecosystem beyond just the web framework, where rapid iteration is helping a developer write once but leverage multiple tools.
For instance:
- FastAPI
- Starlette
- pydantic
- sqlmodel
- postgres
Here's an example discussion for building the full stack yourself: https://medium.com/@lawsontaylor/the-ultimate-fastapi-projec...The value comes from the sort of community-agreed data model:
Why: https://docs.pydantic.dev/latest/why/
Datamodel code gen: https://docs.pydantic.dev/latest/integrations/datamodel_code...
With this at the core, then API contract, doc, DB, test, and SDK generation are at hand, not to mention easier integration with all of these other projects. And now with
Observability: https://pydantic.dev/logfire
I find no hits on the terms `pydantic` or `openapi` in your docs. Given your choice to include Python as one of the three supported languages, do you have a plan to tie into Pydantic or implement a bridge?
The logfire is pretty cool and in the future, it will be implemented in Teo's way.
To be more clear, it's great you have a similar option for each of these, but having things similar to them isn't the same as having the actually same model that everything else in the ecosystem understands and plays well with.
Or, are you saying, under the hood, you're using literally the same? The docs make it sound as though you're reinventing all these wheels (pardon the Python pun).
Congrats on launching.
Is that the problem it's trying to solve?
It seems to work by registering callbacks into a context by name, eschewing any sensible typing relation with the schema. I assume the scaffolding code would lead to panics at startup, or worse, on invocation.
The way to do this would be generating traits and have the user implement the trait.
use Red:api<2>;
model User is rw {
has Int $.id is serial;
has Str $.name is column;
has Str $.email is column{ :unique };
has Str $.password is column{ :nullable } is rw;
has DateTime $.created-at is column .= now;
has DateTime $.updated-at is column .= now;
}
my $*RED-DB = database "SQLite";
User.^create-table;I would lean in on the unified schema aspect, I think that distinguishes it from a lot of web-focused ORMs. It actually feels like it could be compared against GraphQL given the schema and API features.
Of course, that leads me to wonder about the hairy stuff: permissions, rate limiting, schema evolution, etc.
I'm aware that serialization frameworks like protocol buffers do this, but they usually come with a whole lot of other baggage, dependencies, hit-or-miss language support, and clunky APIs. I want something more lightweight that allows me to start developing an application by developing its schema, without it being tied to a specific serialization framework or language implementation.
All that to say: with chatbots being able to implement “the other side”, it really made it a lot easier to just whip up a custom schema and not really worry too much.
(Helped that it was a one off in my case, unclear how well this would scale to real world production usage)
- CBOR for the on the wire format
- CDDL for schema design of CBOR objects.
- WebTransport as the API you use on top of HTTP/3 for actually moving bits of data back and forth between client and server.
The nice thing about that approach to is that it’s in no way tied of any kind of language or other architectural patterns that larger frameworks tend to force you into. The beauty of the standards process I guess.
If someone could put together a great API design experience that wrapped all of that up with cross language code generation like Protobuf / gRPC I would switch tomorrow.
CBOR - RFC 8949 Concise Binary Object Representation
https://www.rfc-editor.org/rfc/rfc8949.html
CDDL - RFC 8610 Concise Data Definition Language (CDDL)