Hey everyone, I come from Golang and Typescript ecosystems and am having a hard time setting up a proper project structure for my python services. I currently have only 3 servers that do different things and reside in separate directories, all of them use poetry
as their dependency manager and have their own venv
‘s, pyproject.toml
and so on.
My issues are
- How can I share code between them, eg common module for logging, metrics and so on
- How can I then bundle and containerize these servers independently
- Preserve DX of my LSP and Pyright
- How to structure my “runnable” (services, apps) as opposed to my libraries?
Any tools that can help me with this? What approaches can I take?
I am thinking of using poetry
‘s development imports of local files, but if I forget to use poetry update
the lock files can get out of date.
There is also uv
and its workspaces feature, but I don’t actually want to pool together all of my dependencies, and it seems that deploying services is not supported out of the box with something like pnpm
with its deploy feature
.
So I am looking for something akin to PNPM in typescript ecosystem, where I can have separate projects but at the same time I can easily reference between them and deploy them independently.
submitted by /u/nikola_milovic
[link] [comments]
r/learnpython Hey everyone, I come from Golang and Typescript ecosystems and am having a hard time setting up a proper project structure for my python services. I currently have only 3 servers that do different things and reside in separate directories, all of them use poetry as their dependency manager and have their own venv’s, pyproject.toml and so on. My issues are How can I share code between them, eg common module for logging, metrics and so on How can I then bundle and containerize these servers independently Preserve DX of my LSP and Pyright How to structure my “runnable” (services, apps) as opposed to my libraries? Any tools that can help me with this? What approaches can I take? I am thinking of using poetry’s development imports of local files, but if I forget to use poetry update the lock files can get out of date. There is also uv and its workspaces feature, but I don’t actually want to pool together all of my dependencies, and it seems that deploying services is not supported out of the box with something like pnpm with its deploy feature. So I am looking for something akin to PNPM in typescript ecosystem, where I can have separate projects but at the same time I can easily reference between them and deploy them independently. submitted by /u/nikola_milovic [link] [comments]
Hey everyone, I come from Golang and Typescript ecosystems and am having a hard time setting up a proper project structure for my python services. I currently have only 3 servers that do different things and reside in separate directories, all of them use poetry
as their dependency manager and have their own venv
‘s, pyproject.toml
and so on.
My issues are
- How can I share code between them, eg common module for logging, metrics and so on
- How can I then bundle and containerize these servers independently
- Preserve DX of my LSP and Pyright
- How to structure my “runnable” (services, apps) as opposed to my libraries?
Any tools that can help me with this? What approaches can I take?
I am thinking of using poetry
‘s development imports of local files, but if I forget to use poetry update
the lock files can get out of date.
There is also uv
and its workspaces feature, but I don’t actually want to pool together all of my dependencies, and it seems that deploying services is not supported out of the box with something like pnpm
with its deploy feature
.
So I am looking for something akin to PNPM in typescript ecosystem, where I can have separate projects but at the same time I can easily reference between them and deploy them independently.
submitted by /u/nikola_milovic
[link] [comments]