The Civis API Python client is a Python package that helps analysts and developers interact with the Civis Platform. The package includes a set of tools around common workflows as well as a convenient interface to make requests directly to the Civis API. See the full documentation for more details.
-
Get a Civis API key (instructions)
-
Add a
CIVIS_API_KEYenvironment variable. -
You can add the following to
.bash_profilefor bashexport CIVIS_API_KEY="alphaNumericApiK3y" -
Source your
.bash_profile -
Install the package
pip install civis -
Optionally, install
pandasto enable some functionality incivis-pythonpip install pandas
civis-python includes a number of wrappers around the Civis API for
common workflows.
import civis
df = civis.io.read_civis(table="my_schema.my_table",
database="database",
use_pandas=True)The Civis API may also be directly accessed via the APIClient class.
import civis
client = civis.APIClient()
database = client.databases.list()See the full documentation for a more complete user guide.
See CONTIBUTING.md for information about contributing to this project.
BSD-3
See LICENSE.md for details.