Skip to main content

xango

Project description

Xango

Xango

API

  • db
  • xql_to_aql
  • parse_xsql
  • parse_xgraphql
  • resolve_xgraphql
  • parse_dict_mutations
  • gen_xid
  • Collection
  • CollectionItem
  • CollectionActiveRecordMixin

Connection

import xango

#--- connect
db = xango.db(hosts="http://host:8529", username="root", password:str)

#--- select collection
coll = db.select_collection('test')

#--- insert item
coll.insert({k:v, ...})

#--- insert item with custom _key
coll.insert({k:v,...}, _key='awesome')


Query

  {
    "_modified_at:$datetime": "+2hh"
  }

Format:

YYYY: Year
MM: Month
DD: Date
HH: Hour
mm: Min
ss: seconds

ISODATE: YYYY-MM-DDTHH:mm:ss

$AND and $OR

filters = {

  "$or": [
    { // query between dates
      "_created_at:$lt": "@@CURRDATE() -2days",
      "_created_at:$gt": "@@CURRDATE() +2days"
    }
  ]
}

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

xango-0.1.34.tar.gz (52.7 kB view hashes)

Uploaded Source

Built Distribution

xango-0.1.34-py3-none-any.whl (55.1 kB view hashes)

Uploaded Python 3

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