Welcome to python-dirmagic’s documentation!

In [1]: from dirmagic import identify_project

In [2]: identify_project(".")
Out[2]:
[('IDE', 'Visual Studio Code project'),
 ('packaging', 'python package'),
 ('version control', 'git'),
 ('version control', 'repository')]

Quick intro: Use Cases

Mission:

dirmagic tells you what type of project/directory structure you’re dealing with.

… just like file/libmagic for files.

Provides:

  • a flexible system to describe directory structures,

  • a comprehensive collection of patterns idenitfying projects (e.g. git repositories, python packages, GIS data), and

  • an interface & tools to make use of those patterns

Inspired by: