Skip to content

odbckrishna/databricks-rest-api-python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Databricks REST API with Python

A Python library created to easily use the Databricks services REST API with Python.

Getting started

Installing

The library can be installed using pip:

pip install dbrest

Using the libary

Importing the library

To add the library to your Python project, use the following line:

import dbrest

Connecting to the Azure Databricks REST API

To connect to the Azure databricks REST API, you need to have a Microsoft account with databricks seriives that has access to API REST Services and an Azure Databricks application. With all that, you can connect to the Databricsk REST API using the following function:


dbrest.connect(
    domain = [domain (required)],
    username = [username (no mandatory)],
    password = [password (no mandatory)],
    bearer = [bearer (required)]
)

Example 1 Getting all the list of queries.

As an example, here's how you can get a list of all the queries using the databricsk restful services:

dbrest.retrieve_a_list_of_queries()

Example 2 Start the databricks cluster using the REST call.

As an example, here's how you can Start the databricks cluster using the REST call.

dbrest.cluster_start(cluster_id)

Documentation

See the documentation

Author

Sai Krishna Cheruvu - Reachout me Linkedin

License

This project is licensed under the MIT License - see the LICENSE.md file for details

About

A Python library created to easily use the Databricks REST API with Python

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages