---
title: "Python"
description: "Connect Python apps to Gitana seamlessly; explore features like node management and access refresh with API. (Gitana 4.0)"
product: "Gitana"
version: "4.0"
url: "/documentation/gitana/4.0/developers/drivers/python"
---

# Python

Connect your Python applications to Gitana

| Latest Version |  |
| --- | --- |
| Version | 1.1.4 |
| Date | July 6, 2023 |
| GitHub | [https://github.com/gitana/cloudcms-python-driver](https://github.com/gitana/cloudcms-python-driver "https://github.com/gitana/cloudcms-python-driver") |
| PYPI | [https://pypi.org/project/cloudcms/1.1.4/](https://pypi.org/project/cloudcms/1.1.4/ "https://pypi.org/project/cloudcms/1.1.4/") |

![Python](/documentation/gitana/4.0/developers/drivers/python/python.svg)

The Gitana Python driver allows you to easily connect your Python 3 applications with the Gitana server. It will work within any Python application and with web frameworks like Flask or Django.

Currently supports the following functionality:

- Connect to and refresh access tokens with the API
- Read platform, branch, and repositories
- Read, query, search, create, update, and delete nodes

## Installation

Make sure you first have Python 3 and pip for Python 3 in your environment. Then, run the following to install:

```
pip install cloudcms
```

## Examples

Below are some examples of how you might use this driver:

```
from cloudcms import CloudCMS

# Connect to Cloud CMS
client = CloudCMS()
platform = client.connect(filename="gitana.json")

# List repositories
repositories = platform.list_repositories()

# Read repository
repository = platform.read_repository('&lt;repository_id&gt;')

# List branches
branches = repository.list_branches()

# Read branch
branch = repository.read_branch('&lt;branch_id&gt;')

# Read Node
node = branch.read_node('&lt;node_id&gt;')

# Create node
obj = {
'title': 'Twelfth Night',
'description': 'An old play'
}
newNode = branch.create_node(obj)

# Query nodes
query = {
'_type': 'store:book'
}
pagination = {
'limit': 2
}
queried_nodes = branch.query_nodes(query, pagination)

# Search/Find nodes
find = {
'search': 'Shakespeare',
'query': {
'_type': 'store:book'
}
}
searched_nodes = branch.find_nodes(find)
```

## Documentation

The Python driver is a useful library that provides access to the capabilities of Gitana from a programmatic perspective. It is therefore important to first familiarize yourself with the concepts presented in the [Gitana Documentation](/documentation.html "Gitana Documentation").

## Fork the Code

The Gitana Python driver is 100% open-source (Apache 2.0) and so you're free to fork it, extend it and dig into it to learn about how it works.

- [View the Source Code](https://github.com/gitana/cloudcms-python-driver "View the Source Code")

## Bugs / Problems

If you run into a bug, please [create an issue](https://github.com/gitana/cloudcms-python-driver/issues "create an issue") so that we can look at it.

For production support, please contact us at [support@gitana.io](mailto:support@gitana.io "support@gitana.io") or call us directly.

## Support and Terms of Use

The Python driver is free to use in your applications and projects. It is fully supported by Gitana.
