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 c
$ 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.1.4.tar.gz (13.6 kB view details)

Uploaded Source

Built Distribution

quillsql-2.1.4-py3-none-any.whl (15.1 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for quillsql-2.1.4.tar.gz
Algorithm Hash digest
SHA256 1084e930afdedcc6851e062f8a59efc3ced8c9c13cde5a73bbc843c4ef8c7d22
MD5 a7dc84e627863e233f451b83d5387f20
BLAKE2b-256 3917d0591c80c35aa477d20116b35757cb323e1f55c0951fcd6e6326cd7783da

See more details on using hashes here.

File details

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

File metadata

  • Download URL: quillsql-2.1.4-py3-none-any.whl
  • Upload date:
  • Size: 15.1 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.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 0856b5b9547d4fdbd1eec916a00cefca7a4e10424dc5fcd6f7915e40829971d8
MD5 60dd2a359825a16203eed8d2c2ce9497
BLAKE2b-256 b0e2458dc71fedf4b6ac05f3474f54e358efd66e8387dc9936b5ade24ce3d96d

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