I’m kinda curious whether it would be possible to either load different instructions via filename or possibly import statements at the top of the file. I know you essentially have different configurations loaded via extension, but I was wondering about taking it a step further and having different settings per project type.
say you have a file named
random_scraper.py because it has that
_scraper.py in the filename it loads snippets useful for working with the
scrapy libraries. you could even take this a step further and use a tool like
yeoman to create new files from templates based on the filename.
another direction to take could be loading different configurations based on the import statements at the top of the file, though that seems like a less desirable solution because you don’t know necessarily if the user will put the import statements at the very top.