Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Q&A

Welcome to Software Development on Codidact!

Will you help us build our independent community of developers helping developers? We're small and trying to grow. We welcome questions about all aspects of software development, from design to code to QA and more. Got questions? Got answers? Got code you'd like someone to review? Please join us.

Post History

77%
+5 −0
Q&A How should I structure a growing Python project?

Official The official Python documentation has material that may be helpful: Tutorials: Modules, including § Packages Virtual Environments and Packages The Python Packaging User Guide,...

posted 8mo ago by wjandrea‭  ·  edited 8mo ago by wjandrea‭

Answer
#8: Post edited by user avatar wjandrea‭ · 2026-01-28T22:28:04Z (8 months ago)
typo/clarify
  • ## Official
  • The official Python documentation has material that may be helpful:
  • - Tutorials:
  • * [Modules](https://docs.python.org/3/tutorial/modules.html), including § [Packages](https://docs.python.org/3/tutorial/modules.html#packages)
  • * [Virtual Environments and Packages](https://docs.python.org/3/tutorial/venv.html)
  • - The [Python Packaging User Guide](https://packaging.python.org/en/latest/), especially [Packaging Python Projects](https://packaging.python.org/en/latest/tutorials/packaging-projects/)
  • A consistent style is important. See [PEP 8 – Style Guide for Python Code](https://peps.python.org/pep-0008/). It doesn't say much about structure, but § [Public and Internal Interfaces](https://peps.python.org/pep-0008/#public-and-internal-interfaces) is relevant. There are tools that can automatically format your code, such as [autopep8](https://pypi.org/project/autopep8/) (which makes minimal changes) and [Black](https://black.readthedocs.io/en/stable/) (which may make sweeping changes).
  • Static typing is helpful, including e.g. for IDE integration. See [Static Typing with Python](https://typing.python.org/en/latest/) and the [`typing` module](https://docs.python.org/3/library/typing.html).
  • ## Other
  • It's important to understand design principles for scalability. For example, [dependency injection](https://en.wikipedia.org/wiki/Dependency_injection) means things that you build are flexible. (As a sidenote, I've always disliked that name. I wouldn't really call it "injection" when it's usually done by just passing. I like to think of it like "if you hire a carpenter to build a shed, the foundation should already be poured, instead of having the carpenter hire someone[]() do it".) [SOLID](https://www.digitalocean.com/community/conceptual-articles/s-o-l-i-d-the-first-five-principles-of-object-oriented-design) is a good core set of principles for OOP.
  • Finally, I hope you're already using a [version-control system](https://en.wikipedia.org/wiki/Version_control_system), but if not, try starting with [Git](https://git-scm.com/) (which the CPython project itself uses, and which the [`venv` module](https://docs.python.org/3/library/venv.html) integrates with).
  • ## Official
  • The official Python documentation has material that may be helpful:
  • - Tutorials:
  • * [Modules](https://docs.python.org/3/tutorial/modules.html), including § [Packages](https://docs.python.org/3/tutorial/modules.html#packages)
  • * [Virtual Environments and Packages](https://docs.python.org/3/tutorial/venv.html)
  • - The [Python Packaging User Guide](https://packaging.python.org/en/latest/), especially [Packaging Python Projects](https://packaging.python.org/en/latest/tutorials/packaging-projects/)
  • A consistent style is important. See [PEP 8 – Style Guide for Python Code](https://peps.python.org/pep-0008/). It doesn't say much about structure, but § [Public and Internal Interfaces](https://peps.python.org/pep-0008/#public-and-internal-interfaces) is relevant. There are tools that can automatically format your code, such as [autopep8](https://pypi.org/project/autopep8/) (which makes minimal changes) and [Black](https://black.readthedocs.io/en/stable/) (which may make sweeping changes).
  • Static typing is helpful, including e.g. for IDE integration. See [Static Typing with Python](https://typing.python.org/en/latest/) and the [`typing` module](https://docs.python.org/3/library/typing.html).
  • ## Other
  • It's important to understand design principles for scalability. For example, [dependency injection](https://en.wikipedia.org/wiki/Dependency_injection) means things that you build are flexible. (As a sidenote, I've always disliked that name. I wouldn't really call it "injection" when it's usually done by just passing. I like to think of it like "if you hire a carpenter to build a shed, the foundation should already be poured, instead of having the carpenter hire someone else to do it".) [SOLID](https://www.digitalocean.com/community/conceptual-articles/s-o-l-i-d-the-first-five-principles-of-object-oriented-design) is a good core set of principles for OOP.
  • Finally, I hope you're already using a [version-control system](https://en.wikipedia.org/wiki/Version_control_system), but if not, try starting with [Git](https://git-scm.com/) (which the CPython project itself uses, and which the [`venv` module](https://docs.python.org/3/library/venv.html) integrates with).
#7: Post edited by user avatar wjandrea‭ · 2026-01-28T22:25:48Z (8 months ago)
clarify dependency injection
  • ## Official
  • The official Python documentation has material that may be helpful:
  • - Tutorials:
  • * [Modules](https://docs.python.org/3/tutorial/modules.html), including § [Packages](https://docs.python.org/3/tutorial/modules.html#packages)
  • * [Virtual Environments and Packages](https://docs.python.org/3/tutorial/venv.html)
  • - The [Python Packaging User Guide](https://packaging.python.org/en/latest/), especially [Packaging Python Projects](https://packaging.python.org/en/latest/tutorials/packaging-projects/)
  • A consistent style is important. See [PEP 8 – Style Guide for Python Code](https://peps.python.org/pep-0008/). It doesn't say much about structure, but § [Public and Internal Interfaces](https://peps.python.org/pep-0008/#public-and-internal-interfaces) is relevant. There are tools that can automatically format your code, such as [autopep8](https://pypi.org/project/autopep8/) (which makes minimal changes) and [Black](https://black.readthedocs.io/en/stable/) (which may make sweeping changes).
  • Static typing is helpful, including e.g. for IDE integration. See [Static Typing with Python](https://typing.python.org/en/latest/) and the [`typing` module](https://docs.python.org/3/library/typing.html).
  • ## Other
  • It's important to understand design principles for scalability. For example, [dependency injection](https://en.wikipedia.org/wiki/Dependency_injection) means things that you build are flexible. (As a sidenote, I've always disliked that name. I wouldn't really call it "injection" when it's usually done by just passing. I like to think of it like "if you hire a carpenter to build a shed, the foundation should already be poured".) [SOLID](https://www.digitalocean.com/community/conceptual-articles/s-o-l-i-d-the-first-five-principles-of-object-oriented-design) is a good core set of principles for OOP.
  • Finally, I hope you're already using a [version-control system](https://en.wikipedia.org/wiki/Version_control_system), but if not, try starting with [Git](https://git-scm.com/) (which the CPython project itself uses, and which the [`venv` module](https://docs.python.org/3/library/venv.html) integrates with).[]()
  • ## Official
  • The official Python documentation has material that may be helpful:
  • - Tutorials:
  • * [Modules](https://docs.python.org/3/tutorial/modules.html), including § [Packages](https://docs.python.org/3/tutorial/modules.html#packages)
  • * [Virtual Environments and Packages](https://docs.python.org/3/tutorial/venv.html)
  • - The [Python Packaging User Guide](https://packaging.python.org/en/latest/), especially [Packaging Python Projects](https://packaging.python.org/en/latest/tutorials/packaging-projects/)
  • A consistent style is important. See [PEP 8 – Style Guide for Python Code](https://peps.python.org/pep-0008/). It doesn't say much about structure, but § [Public and Internal Interfaces](https://peps.python.org/pep-0008/#public-and-internal-interfaces) is relevant. There are tools that can automatically format your code, such as [autopep8](https://pypi.org/project/autopep8/) (which makes minimal changes) and [Black](https://black.readthedocs.io/en/stable/) (which may make sweeping changes).
  • Static typing is helpful, including e.g. for IDE integration. See [Static Typing with Python](https://typing.python.org/en/latest/) and the [`typing` module](https://docs.python.org/3/library/typing.html).
  • ## Other
  • It's important to understand design principles for scalability. For example, [dependency injection](https://en.wikipedia.org/wiki/Dependency_injection) means things that you build are flexible. (As a sidenote, I've always disliked that name. I wouldn't really call it "injection" when it's usually done by just passing. I like to think of it like "if you hire a carpenter to build a shed, the foundation should already be poured, instead of having the carpenter hire someone[]() do it".) [SOLID](https://www.digitalocean.com/community/conceptual-articles/s-o-l-i-d-the-first-five-principles-of-object-oriented-design) is a good core set of principles for OOP.
  • Finally, I hope you're already using a [version-control system](https://en.wikipedia.org/wiki/Version_control_system), but if not, try starting with [Git](https://git-scm.com/) (which the CPython project itself uses, and which the [`venv` module](https://docs.python.org/3/library/venv.html) integrates with).
#6: Post edited by user avatar wjandrea‭ · 2026-01-28T22:23:16Z (8 months ago)
clarify how "CPython uses" Git
  • ## Official
  • The official Python documentation has material that may be helpful:
  • - Tutorials:
  • * [Modules](https://docs.python.org/3/tutorial/modules.html), including § [Packages](https://docs.python.org/3/tutorial/modules.html#packages)
  • * [Virtual Environments and Packages](https://docs.python.org/3/tutorial/venv.html)
  • - The [Python Packaging User Guide](https://packaging.python.org/en/latest/), especially [Packaging Python Projects](https://packaging.python.org/en/latest/tutorials/packaging-projects/)
  • A consistent style is important. See [PEP 8 – Style Guide for Python Code](https://peps.python.org/pep-0008/). It doesn't say much about structure, but § [Public and Internal Interfaces](https://peps.python.org/pep-0008/#public-and-internal-interfaces) is relevant. There are tools that can automatically format your code, such as [autopep8](https://pypi.org/project/autopep8/) (which makes minimal changes) and [Black](https://black.readthedocs.io/en/stable/) (which may make sweeping changes).
  • Static typing is helpful, including e.g. for IDE integration. See [Static Typing with Python](https://typing.python.org/en/latest/) and the [`typing` module](https://docs.python.org/3/library/typing.html).
  • ## Other
  • It's important to understand design principles for scalability. For example, [dependency injection](https://en.wikipedia.org/wiki/Dependency_injection) means things that you build are flexible. (As a sidenote, I've always disliked that name. I wouldn't really call it "injection" when it's usually done by just passing. I like to think of it like "if you hire a carpenter to build a shed, the foundation should already be poured".) [SOLID](https://www.digitalocean.com/community/conceptual-articles/s-o-l-i-d-the-first-five-principles-of-object-oriented-design) is a good core set of principles for OOP.
  • Finally, I hope you're already using a [version-control system](https://en.wikipedia.org/wiki/Version_control_system), but if not, try starting with [Git](https://git-scm.com/) (which CPython itself uses, and which the [`venv` module](https://docs.python.org/3/library/venv.html) integrates with).[]()
  • ## Official
  • The official Python documentation has material that may be helpful:
  • - Tutorials:
  • * [Modules](https://docs.python.org/3/tutorial/modules.html), including § [Packages](https://docs.python.org/3/tutorial/modules.html#packages)
  • * [Virtual Environments and Packages](https://docs.python.org/3/tutorial/venv.html)
  • - The [Python Packaging User Guide](https://packaging.python.org/en/latest/), especially [Packaging Python Projects](https://packaging.python.org/en/latest/tutorials/packaging-projects/)
  • A consistent style is important. See [PEP 8 – Style Guide for Python Code](https://peps.python.org/pep-0008/). It doesn't say much about structure, but § [Public and Internal Interfaces](https://peps.python.org/pep-0008/#public-and-internal-interfaces) is relevant. There are tools that can automatically format your code, such as [autopep8](https://pypi.org/project/autopep8/) (which makes minimal changes) and [Black](https://black.readthedocs.io/en/stable/) (which may make sweeping changes).
  • Static typing is helpful, including e.g. for IDE integration. See [Static Typing with Python](https://typing.python.org/en/latest/) and the [`typing` module](https://docs.python.org/3/library/typing.html).
  • ## Other
  • It's important to understand design principles for scalability. For example, [dependency injection](https://en.wikipedia.org/wiki/Dependency_injection) means things that you build are flexible. (As a sidenote, I've always disliked that name. I wouldn't really call it "injection" when it's usually done by just passing. I like to think of it like "if you hire a carpenter to build a shed, the foundation should already be poured".) [SOLID](https://www.digitalocean.com/community/conceptual-articles/s-o-l-i-d-the-first-five-principles-of-object-oriented-design) is a good core set of principles for OOP.
  • Finally, I hope you're already using a [version-control system](https://en.wikipedia.org/wiki/Version_control_system), but if not, try starting with [Git](https://git-scm.com/) (which the CPython project itself uses, and which the [`venv` module](https://docs.python.org/3/library/venv.html) integrates with).[]()
#5: Post edited by user avatar wjandrea‭ · 2026-01-28T21:39:47Z (8 months ago)
+design principles. +headers.
  • The official Python documentation has material that may be helpful:
  • - Tutorials:
  • * [Modules](https://docs.python.org/3/tutorial/modules.html), including § [Packages](https://docs.python.org/3/tutorial/modules.html#packages)
  • * [Virtual Environments and Packages](https://docs.python.org/3/tutorial/venv.html)
  • - The [Python Packaging User Guide](https://packaging.python.org/en/latest/), especially [Packaging Python Projects](https://packaging.python.org/en/latest/tutorials/packaging-projects/)
  • A consistent style is important. See [PEP 8 – Style Guide for Python Code](https://peps.python.org/pep-0008/). It doesn't say much about structure, but § [Public and Internal Interfaces](https://peps.python.org/pep-0008/#public-and-internal-interfaces) is relevant. There are tools that can automatically format your code, such as [autopep8](https://pypi.org/project/autopep8/) (which makes minimal changes) and [Black](https://black.readthedocs.io/en/stable/) (which may make sweeping changes).
  • Static typing is helpful, including e.g. for IDE integration. See [Static Typing with Python](https://typing.python.org/en/latest/) and the [`typing` module](https://docs.python.org/3/library/typing.html).
  • Finally, I hope you're already using a [version-control system](https://en.wikipedia.org/wiki/Version_control_system), but if not, try starting with [Git](https://git-scm.com/) (which CPython itself uses, and which the [`venv` module](https://docs.python.org/3/library/venv.html) integrates with).[]()
  • ## Official
  • The official Python documentation has material that may be helpful:
  • - Tutorials:
  • * [Modules](https://docs.python.org/3/tutorial/modules.html), including § [Packages](https://docs.python.org/3/tutorial/modules.html#packages)
  • * [Virtual Environments and Packages](https://docs.python.org/3/tutorial/venv.html)
  • - The [Python Packaging User Guide](https://packaging.python.org/en/latest/), especially [Packaging Python Projects](https://packaging.python.org/en/latest/tutorials/packaging-projects/)
  • A consistent style is important. See [PEP 8 – Style Guide for Python Code](https://peps.python.org/pep-0008/). It doesn't say much about structure, but § [Public and Internal Interfaces](https://peps.python.org/pep-0008/#public-and-internal-interfaces) is relevant. There are tools that can automatically format your code, such as [autopep8](https://pypi.org/project/autopep8/) (which makes minimal changes) and [Black](https://black.readthedocs.io/en/stable/) (which may make sweeping changes).
  • Static typing is helpful, including e.g. for IDE integration. See [Static Typing with Python](https://typing.python.org/en/latest/) and the [`typing` module](https://docs.python.org/3/library/typing.html).
  • ## Other
  • It's important to understand design principles for scalability. For example, [dependency injection](https://en.wikipedia.org/wiki/Dependency_injection) means things that you build are flexible. (As a sidenote, I've always disliked that name. I wouldn't really call it "injection" when it's usually done by just passing. I like to think of it like "if you hire a carpenter to build a shed, the foundation should already be poured".) [SOLID](https://www.digitalocean.com/community/conceptual-articles/s-o-l-i-d-the-first-five-principles-of-object-oriented-design) is a good core set of principles for OOP.
  • Finally, I hope you're already using a [version-control system](https://en.wikipedia.org/wiki/Version_control_system), but if not, try starting with [Git](https://git-scm.com/) (which CPython itself uses, and which the [`venv` module](https://docs.python.org/3/library/venv.html) integrates with).[]()
#4: Post edited by user avatar wjandrea‭ · 2026-01-28T20:01:53Z (8 months ago)
+stylers
  • The official Python documentation has material that may be helpful:
  • - Tutorials:
  • * [Modules](https://docs.python.org/3/tutorial/modules.html), including § [Packages](https://docs.python.org/3/tutorial/modules.html#packages)
  • * [Virtual Environments and Packages](https://docs.python.org/3/tutorial/venv.html)
  • - The [Python Packaging User Guide](https://packaging.python.org/en/latest/), especially [Packaging Python Projects](https://packaging.python.org/en/latest/tutorials/packaging-projects/)
  • A consistent style is important. See [PEP 8 – Style Guide for Python Code](https://peps.python.org/pep-0008/). It doesn't say much about structure, but § [Public and Internal Interfaces](https://peps.python.org/pep-0008/#public-and-internal-interfaces) is relevant.
  • Static typing is helpful, including e.g. for IDE integration. See [Static Typing with Python](https://typing.python.org/en/latest/) and the [`typing` module](https://docs.python.org/3/library/typing.html).
  • Finally, I hope you're already using a [version-control system](https://en.wikipedia.org/wiki/Version_control_system), but if not, try starting with [Git](https://git-scm.com/) (which CPython itself uses, and which the [`venv` module](https://docs.python.org/3/library/venv.html) integrates with).
  • The official Python documentation has material that may be helpful:
  • - Tutorials:
  • * [Modules](https://docs.python.org/3/tutorial/modules.html), including § [Packages](https://docs.python.org/3/tutorial/modules.html#packages)
  • * [Virtual Environments and Packages](https://docs.python.org/3/tutorial/venv.html)
  • - The [Python Packaging User Guide](https://packaging.python.org/en/latest/), especially [Packaging Python Projects](https://packaging.python.org/en/latest/tutorials/packaging-projects/)
  • A consistent style is important. See [PEP 8 – Style Guide for Python Code](https://peps.python.org/pep-0008/). It doesn't say much about structure, but § [Public and Internal Interfaces](https://peps.python.org/pep-0008/#public-and-internal-interfaces) is relevant. There are tools that can automatically format your code, such as [autopep8](https://pypi.org/project/autopep8/) (which makes minimal changes) and [Black](https://black.readthedocs.io/en/stable/) (which may make sweeping changes).
  • Static typing is helpful, including e.g. for IDE integration. See [Static Typing with Python](https://typing.python.org/en/latest/) and the [`typing` module](https://docs.python.org/3/library/typing.html).
  • Finally, I hope you're already using a [version-control system](https://en.wikipedia.org/wiki/Version_control_system), but if not, try starting with [Git](https://git-scm.com/) (which CPython itself uses, and which the [`venv` module](https://docs.python.org/3/library/venv.html) integrates with).[]()
#3: Post edited by user avatar wjandrea‭ · 2026-01-28T19:59:29Z (8 months ago)
  • The official Python documentation has material that may be helpful:
  • - Tutorials:
  • * [Modules](https://docs.python.org/3/tutorial/modules.html), including § [Packages](https://docs.python.org/3/tutorial/modules.html#packages)
  • * [Virtual Environments and Packages](https://docs.python.org/3/tutorial/venv.html)
  • - The [Python Packaging User Guide](https://packaging.python.org/en/latest/), especially [Packaging Python Projects](https://packaging.python.org/en/latest/tutorials/packaging-projects/)
  • - A consistent style is important. See [PEP 8 – Style Guide for Python Code](https://peps.python.org/pep-0008/). It doesn't say much about structure, but § [Public and Internal Interfaces](https://peps.python.org/pep-0008/#public-and-internal-interfaces) is relevant.
  • - Static typing is helpful, including e.g. for IDE integration. See [Static Typing with Python](https://typing.python.org/en/latest/) and the [`typing` module](https://docs.python.org/3/library/typing.html).
  • Finally, I hope you're already using a [version-control system](https://en.wikipedia.org/wiki/Version_control_system), but if not, try starting with [Git](https://git-scm.com/) (which CPython itself uses, and which the [`venv` module](https://docs.python.org/3/library/venv.html) integrates with).
  • The official Python documentation has material that may be helpful:
  • - Tutorials:
  • * [Modules](https://docs.python.org/3/tutorial/modules.html), including § [Packages](https://docs.python.org/3/tutorial/modules.html#packages)
  • * [Virtual Environments and Packages](https://docs.python.org/3/tutorial/venv.html)
  • - The [Python Packaging User Guide](https://packaging.python.org/en/latest/), especially [Packaging Python Projects](https://packaging.python.org/en/latest/tutorials/packaging-projects/)
  • A consistent style is important. See [PEP 8 – Style Guide for Python Code](https://peps.python.org/pep-0008/). It doesn't say much about structure, but § [Public and Internal Interfaces](https://peps.python.org/pep-0008/#public-and-internal-interfaces) is relevant.
  • Static typing is helpful, including e.g. for IDE integration. See [Static Typing with Python](https://typing.python.org/en/latest/) and the [`typing` module](https://docs.python.org/3/library/typing.html).
  • Finally, I hope you're already using a [version-control system](https://en.wikipedia.org/wiki/Version_control_system), but if not, try starting with [Git](https://git-scm.com/) (which CPython itself uses, and which the [`venv` module](https://docs.python.org/3/library/venv.html) integrates with).
#2: Post edited by user avatar wjandrea‭ · 2026-01-28T19:58:58Z (8 months ago)
+info about Git
  • The official Python documentation has material that may be helpful:
  • - Tutorials:
  • * [Modules](https://docs.python.org/3/tutorial/modules.html), including § [Packages](https://docs.python.org/3/tutorial/modules.html#packages)
  • * [Virtual Environments and Packages](https://docs.python.org/3/tutorial/venv.html)
  • - The [Python Packaging User Guide](https://packaging.python.org/en/latest/), especially [Packaging Python Projects](https://packaging.python.org/en/latest/tutorials/packaging-projects/)
  • - A consistent style is important. See [PEP 8 – Style Guide for Python Code](https://peps.python.org/pep-0008/). It doesn't say much about structure, but § [Public and Internal Interfaces](https://peps.python.org/pep-0008/#public-and-internal-interfaces) is relevant.
  • - Static typing is helpful, including e.g. for IDE integration. See [Static Typing with Python](https://typing.python.org/en/latest/) and the [`typing` module](https://docs.python.org/3/library/typing.html).
  • Finally, I hope you're already using a [version-control system](https://en.wikipedia.org/wiki/Version_control_system), but if not, try starting with [Git](https://git-scm.com/).
  • The official Python documentation has material that may be helpful:
  • - Tutorials:
  • * [Modules](https://docs.python.org/3/tutorial/modules.html), including § [Packages](https://docs.python.org/3/tutorial/modules.html#packages)
  • * [Virtual Environments and Packages](https://docs.python.org/3/tutorial/venv.html)
  • - The [Python Packaging User Guide](https://packaging.python.org/en/latest/), especially [Packaging Python Projects](https://packaging.python.org/en/latest/tutorials/packaging-projects/)
  • - A consistent style is important. See [PEP 8 – Style Guide for Python Code](https://peps.python.org/pep-0008/). It doesn't say much about structure, but § [Public and Internal Interfaces](https://peps.python.org/pep-0008/#public-and-internal-interfaces) is relevant.
  • - Static typing is helpful, including e.g. for IDE integration. See [Static Typing with Python](https://typing.python.org/en/latest/) and the [`typing` module](https://docs.python.org/3/library/typing.html).
  • Finally, I hope you're already using a [version-control system](https://en.wikipedia.org/wiki/Version_control_system), but if not, try starting with [Git](https://git-scm.com/) (which CPython itself uses, and which the [`venv` module](https://docs.python.org/3/library/venv.html) integrates with).
#1: Initial revision by user avatar wjandrea‭ · 2026-01-28T19:55:59Z (8 months ago)
The official Python documentation has material that may be helpful:

- Tutorials:
  * [Modules](https://docs.python.org/3/tutorial/modules.html), including § [Packages](https://docs.python.org/3/tutorial/modules.html#packages)
  * [Virtual Environments and Packages](https://docs.python.org/3/tutorial/venv.html)
- The [Python Packaging User Guide](https://packaging.python.org/en/latest/), especially [Packaging Python Projects](https://packaging.python.org/en/latest/tutorials/packaging-projects/)
- A consistent style is important. See [PEP 8 – Style Guide for Python Code](https://peps.python.org/pep-0008/). It doesn't say much about structure, but § [Public and Internal Interfaces](https://peps.python.org/pep-0008/#public-and-internal-interfaces) is relevant.
- Static typing is helpful, including e.g. for IDE integration. See [Static Typing with Python](https://typing.python.org/en/latest/) and the [`typing` module](https://docs.python.org/3/library/typing.html).

Finally, I hope you're already using a [version-control system](https://en.wikipedia.org/wiki/Version_control_system), but if not, try starting with [Git](https://git-scm.com/).