Working in Python
Frictionless Framework is a Python framework so it's naturally to be used within a Python programming environment.
Install#
To install the package please follow the Quick Start guide.
Import#
The package in Python is exposed as a single module called frictionless.
Core#
After installation you can import and use it to access the core functionality:
Another option is to used named import:
Frictionless has a reach API including high-level functions and classes. You can find a full list in the API Reference.
Plugins#
Frictionless ships with more than dozen builtin plugins. Usually you don't need to use them directly as it will be inferred and handled automatically, but, in some cases, you need to import their classes. For example:
Debug#
All the metadata classes inherit from the dict type so you can just print it:
For tabular resource you can also use the resource.to_view() function for pretty-printing tables:
Errors#
Frictionless uses a unifed error tree but there is only one exception frictionless.FrictionlessException so you need to catch this one and analyze an attached error:
If you got some other exception using the Frictionless codebase it might be a bug so please report it to the Issue Tracker.
Hints#
Working with Frictionless in some modern Code Editor or interactive Notebook you can use code hints/completion capability. For example, there are many transform steps available, to find a right one just start typing:
The same works for class' and functions' arguments:

