alex-oleshkevich / starlette_boot Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
I'm going to share the idea that I had, which I didn't implement yet.
I want to have a very extensible tool, and I don't want to rely on static layouts. People may disagree with small things, and change their project structure, which would cause "naive" tools to fail. What I thought is to identify what I call "entities" in a project, and each entity has a metadata - and new custom entities can be created.
Let's go to an example. Assume we have the following project layout:
bootstrap/
├── app/
│ ├── __init.py__
│ ├── main.py
│ ├── config.py
│ └── database.py
└── Dockerfile
We would infer the entities on the project, and save it in a cache locally. Some entities I can see:
Entity: Application
Metadata: location (main.py
), package (FastAPI/Starlette), middlewares
Entity: Configuration
Metadata: location (config.py
), kind
(BaseSettings
, Starlette.config
)
Entity: Database
Metadata: location database.py
, kind
(PostgreSQL, SQLite), package
(SQLAlchemy, other)
Metadata can be more precise to make it easier to add plugins around it.
Then, if we have a Sentry plugin, it would interact with the Application entity, and include a middleware to the middleware metadata.
Another example, the alembic plugin, it would interact with the Database entity, and the entity that is in charge of startup command (?).
This is food for thoughts.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.