-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make Cadwyn useable purely for schema versioning (sans FastAPI) #203
Comments
Hi! I have exposed the internal interface for schema generation in 4.1.0 and added a small code snipped about it to the docs: https://docs.cadwyn.dev/concepts/schema_generation/#generating-schemas-without-fastapi FastAPI will still be in your requirements but it's quite small compared to pydantic 2. Would this solve your problem? |
@zmievsa Sorry for the late response. I have separate client + server packages, each hosted in a different repo with different dependencies. The server package has 2 versions of an API one of which IS graph TD
Flask:api-v0<-->client-v0
FastAPI:api-v1<-->client-v1
The client library is an opensource application that only needs to integrate with the server when users are using our paid SaaS product, otherwise everything happens locally (against local configuration files or in-memory). Ideally, I'd like to use graph TD
Flask:SaaS-v0<-->client-v0
FastAPI:SaaS-v1<-->client-v1
local:<-->client-v0
local:<-->client-v1
|
It's probably a ton of work but honestly: your use case is inspiring. Let me dig into this and see what approach we could use. One thing I worry about is making Cadwyn harder to evolve or breaking compatibility for old clients. |
I tried a few ways but all of them have either made Cadwyn harder to start with (+ added breaking changes) or made Cadwyn significantly harder to support. However, I have looked at how big each dependency is and how much FastAPI adds. FastAPI and all of its dependencies take about 13% of all external dependencies in a clean venv. So even though fastapi adds extra dependencies, it adds very little size to your venv and will not slow down your code. The statistics: |
Is your feature request related to a problem? Please describe.
I would like to be able to use
cadwyn
without FastAPI.Describe the solution you'd like
I can define schema versions and migrations for my Pydantic models, without requiring me to use FastAPI.
The text was updated successfully, but these errors were encountered: