Installation¶
Getting Started¶
This package is available from the Python Package Index. If you have pip you should be able to do:
$ pip install petl
You can also download manually, extract and run python setup.py
install
.
To verify the installation, the test suite can be run with pytest, e.g.:
$ pip install pytest
$ pytest -v petl
petl
has been tested with Python versions 2.7 and 3.4-3.6
under Linux and Windows operating systems.
Dependencies and extensions¶
This package is written in pure Python and has no installation requirements other than the Python core modules.
Some domain-specific and/or experimental extensions to petl
are
available from the petlx package.
Some of the functions in this package require installation of third party packages. These packages are indicated in the relevant parts of the documentation for each file format.
Also is possible to install some of dependencies when installing petl by specifying optional extra features, e.g.:
$ pip install petl['avro', 'interval', 'remote']
The available extra features are:
- db
For using records from Databases with SQLAlchemy.
Note that is also required installing the package for the desired database.
- interval
- For using Interval transformations with intervaltree
- avro
- For using Avro files with fastavro
- pandas
- For using DataFrames with pandas
- numpy
- For using Arrays with numpy
- xls
- For using Excel/LO files with xlrd/xlwt
- xlsx
- For using Excel/LO files with openpyxl
- xpath
- For using XPath expressions with lxml
- bcolz
- For using Bcolz ctables with bcolz
- whoosh
- For using Text indexes with whoosh
- hdf5
For using HDF5 files with PyTables.
Note that also are additional software to be installed.
- remote
For reading and writing from Remote Sources with fsspec.
Note that fsspec also depends on other packages for providing support for each protocol as described in
petl.io.remotes.RemoteSource
.