Search code examples
pythonpython-3.xstructureprojectproject-structure

Best practices for structuring Python project with non python files e.g. DLL, .c, .cpp?


I'm wondering where shall I put my non-python files (DLL, .c, .cpp). Currently I keep it in 'resources' folder under my package destination:

my_project/
   docs\
   my_pkg/
       resources/
         API.dll
       __init__.py
       module.py
   tests\
       test_module
   .gitignore
   README.md
   MANIFEST.in
   requirements.txt
   setup.py

I want to know what is Pythonic way?


Solution

  • Perfect place, see Python Packaging Guide. Don't forget to put the files into setup.py or MANIFEST.in.