Coder Social home page Coder Social logo

starlette_boot's People

Contributors

alex-oleshkevich avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

starlette_boot's Issues

Project introspection idea

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.