Skip to content
Snippets Groups Projects
Select Git revision
  • master default protected
  • date-parsing
  • v2.2.0
  • v2.1.0
  • v2.0.0
  • v1.0.0
  • v0.1.0
7 results

postgrestutils

  • Clone with SSH
  • Clone with HTTPS
  • postgrestutils

    A very basic POSTGREST client and utils

    Setup

    Django
    • add "postgrestutils" to your INSTALLED_APPS setting
    • add POSTGREST_UTILS_BASE_URI (should default to the most frequently used POSTGREST instance in the future) and POSTGREST_UTILS_JWT to your project settings
    from postgrestutils.client import pgrest_client
    pgrest_client.get("kerbals?select=id,forename")
    Other projects
    from postgrestutils import settings
    
    settings.BASE_URI = "http://localhost:3000"
    settings.JWT = ""
    
    from postgrestutils.client import pgrest_client
    
    res = pgrest_client.get("kerbals?select=id,forename")