Skip to main content

Doorda package for access to host and API platform

Project description

# Doorda Python SDK

## Installation


### PyPi
```bash
$ pip install doorda-sdk
```


### Source
#### Download from:
1) https://github.com/Doorda/doorda-python-sdk/releases
2) git clone git@github.com:doorda/doorda-python-sdk.git

#### Install
```bash
python setup.py install
```

## Usage

### DoordaHost

1) Connect to database
```python
from doorda_sdk.host import client


conn = client.connect(user="username",
password="password",
catalog="catalog_name",
schema="schema_name")
cursor = conn.cursor()
```

2) Execute Queries
```python

cursor.execute("SELECT * FROM table_name")

# Fetch all results
rows = cursor.fetchall()

# Fetch one results
rows = cursor.fetchone()

# Fetch multiple results
rows = cursor.fetchmany(size=10)

# Get list of column names
cursor.col_names()

# Get column names mapped to data types
cursor.col_types()
```

3) Simplified Functions

```python

# Check database connection

results = cursor.is_connected()

# List all catalogs
rows = cursor.show_catalogs()

# Get number of rows
rows = cursor.table_stats(catalog="catalog_name",
schema="schema_name",
table="table_name")
```

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

doorda_sdk-1.0.1.tar.gz (4.1 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page