Skip to main content

Quill SDK for Python.

Project description

Quill Python SDK

Quickstart

First, install the quillsql package by running:

$ pip install quillsql

Then, add a /quill endpoint to your existing python server. For example, if you were running a FASTAPI app, you would just add the endpoint like this:

from quillsql import Quill
from fastapi import FastAPI, Request

app = FastAPI()

quill = Quill(
    private_key=<YOUR_PRIVATE_KEY_HERE>,
    database_connection_string=<YOUR_DB_CONNECTION_STRING_HERE>,
)

# ... your existing endpoints here ...

@app.post("/quill")
async def quill_post(data: Request):
    body = await data.json()
    return quill.query(org_id="2", data=body)

Then you can run your app like normally. Pass in this route to our react library on the frontend and you all set!

For local testing (dev purposes only)

pipenv install
pipenv shell
uvicorn examples.fastapi-server.app:app --reload --port 3000

You are now ready to ping your local server at http://localhost:3000.

Troubleshooting

If you run into issues with Library not loaded: @rpath/libpq.5.dylib or no LC_RPATH's found, try uninstalling and reinstalling postgres on your machine. For example, using homebrew:

$ brew uninstall postgresql
$ brew update
$ brew install postgresql

If you're still having this issue, this resource might also be useful for you: https://www.psycopg.org/docs/install.html.

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

quillsql-2.0.6.tar.gz (4.7 kB view details)

Uploaded Source

Built Distribution

quillsql-2.0.6-py3-none-any.whl (5.9 kB view details)

Uploaded Python 3

File details

Details for the file quillsql-2.0.6.tar.gz.

File metadata

  • Download URL: quillsql-2.0.6.tar.gz
  • Upload date:
  • Size: 4.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.6

File hashes

Hashes for quillsql-2.0.6.tar.gz
Algorithm Hash digest
SHA256 c7b647e246fa6c16c148a0795f7c90903fa2c5622e6899dc856bac47ad3e9866
MD5 863b0ad2731feb2825219186ece5986c
BLAKE2b-256 cb4fcd530e1c6ea8e966807c94c0f46bab7fc2288af17c2448d91c32c7412284

See more details on using hashes here.

File details

Details for the file quillsql-2.0.6-py3-none-any.whl.

File metadata

  • Download URL: quillsql-2.0.6-py3-none-any.whl
  • Upload date:
  • Size: 5.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.6

File hashes

Hashes for quillsql-2.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 4cf36ff3e4cf5af6521432ed1577bee902d611c1a83bf8931de2f12454ebef07
MD5 1a891faf1314b0348ca3f0d63a7ca1ea
BLAKE2b-256 f9310b4ebdca52d62e92f4477719747d97c508d3cde5eedfa26984bc0ee1fe4b

See more details on using hashes here.

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