| 1 |
Installation |
| 2 |
============ |
| 3 |
|
| 4 |
.. _intro_installation: |
| 5 |
|
| 6 |
Getting Started |
| 7 |
--------------- |
| 8 |
|
| 9 |
This package is available from the `Python Package Index |
| 10 |
<http://pypi.python.org/pypi/petl>`_. If you have `pip |
| 11 |
<https://pip.pypa.io/>`_ you should be able to do:: |
| 12 |
|
| 13 |
$ pip install petl |
| 14 |
|
| 15 |
You can also download manually, extract and run ``python setup.py |
| 16 |
install``. |
| 17 |
|
| 18 |
To verify the installation, the test suite can be run with `pytest |
| 19 |
<https://docs.pytest.org/>`_, e.g.:: |
| 20 |
|
| 21 |
$ pip install pytest |
| 22 |
$ pytest -v petl |
| 23 |
|
| 24 |
:mod:`petl` has been tested with Python versions 2.7 and 3.6-3.13 |
| 25 |
under Linux, MacOS, and Windows operating systems. |
| 26 |
|
| 27 |
.. _intro_dependencies: |
| 28 |
|
| 29 |
Dependencies and extensions |
| 30 |
--------------------------- |
| 31 |
|
| 32 |
This package is written in pure Python and has no installation requirements |
| 33 |
other than the Python core modules. |
| 34 |
|
| 35 |
Some domain-specific and/or experimental extensions to :mod:`petl` are |
| 36 |
available from the petlx_ package. |
| 37 |
|
| 38 |
.. _petlx: http://petlx.readthedocs.org |
| 39 |
|
| 40 |
Some of the functions in this package require installation of third party |
| 41 |
packages. These packages are indicated in the relevant parts of the |
| 42 |
documentation for each file format. |
| 43 |
|
| 44 |
Also is possible to install some of dependencies when installing `petl` by |
| 45 |
specifying optional extra features, e.g.:: |
| 46 |
|
| 47 |
$ pip install petl['avro', 'interval', 'remote'] |
| 48 |
|
| 49 |
The available extra features are: |
| 50 |
|
| 51 |
db |
| 52 |
For using records from :ref:`Databases <io_db>` with `SQLAlchemy`. |
| 53 |
|
| 54 |
Note that is also required installing the package for the desired database. |
| 55 |
|
| 56 |
interval |
| 57 |
For using :ref:`Interval transformations <transform_intervals>` |
| 58 |
with `intervaltree` |
| 59 |
|
| 60 |
avro |
| 61 |
For using :ref:`Avro files <io_avro>` with `fastavro` |
| 62 |
|
| 63 |
pandas |
| 64 |
For using :ref:`DataFrames <io_pandas>` with `pandas` |
| 65 |
|
| 66 |
numpy |
| 67 |
For using :ref:`Arrays <io_numpy>` with `numpy` |
| 68 |
|
| 69 |
xls |
| 70 |
For using :ref:`Excel/LO files <io_xls>` with `xlrd`/`xlwt` |
| 71 |
|
| 72 |
xlsx |
| 73 |
For using :ref:`Excel/LO files <io_xlsx>` with `openpyxl` |
| 74 |
|
| 75 |
xpath |
| 76 |
For using :ref:`XPath expressions <io_xml>` with `lxml` |
| 77 |
|
| 78 |
bcolz |
| 79 |
For using :ref:`Bcolz ctables <io_bcolz>` with `bcolz` |
| 80 |
|
| 81 |
whoosh |
| 82 |
For using :ref:`Text indexes <io_whoosh>` with `whoosh` |
| 83 |
|
| 84 |
hdf5 |
| 85 |
For using :ref:`HDF5 files <io_pytables>` with `PyTables`. |
| 86 |
|
| 87 |
Note that also are additional software to be installed. |
| 88 |
|
| 89 |
remote |
| 90 |
For reading and writing from :ref:`Remote Sources <io_remotes>` with `fsspec`. |
| 91 |
|
| 92 |
Note that `fsspec` also depends on other packages for providing support for |
| 93 |
each protocol as described in :class:`petl.io.remotes.RemoteSource`. |