{"id":29020357,"url":"https://github.com/appbaseio/appbase.py-deprecate","last_synced_at":"2025-06-26T01:05:27.957Z","repository":{"id":29027398,"uuid":"32554723","full_name":"appbaseio/appbase.py-deprecate","owner":"appbaseio","description":" Python Wrapper for Appbase Rest API","archived":false,"fork":false,"pushed_at":"2015-05-13T23:10:06.000Z","size":180,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-06-19T03:06:40.605Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/appbaseio.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-03-20T00:59:54.000Z","updated_at":"2016-07-09T07:45:22.000Z","dependencies_parsed_at":"2022-08-22T02:31:10.533Z","dependency_job_id":null,"html_url":"https://github.com/appbaseio/appbase.py-deprecate","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/appbaseio/appbase.py-deprecate","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/appbaseio%2Fappbase.py-deprecate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/appbaseio%2Fappbase.py-deprecate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/appbaseio%2Fappbase.py-deprecate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/appbaseio%2Fappbase.py-deprecate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/appbaseio","download_url":"https://codeload.github.com/appbaseio/appbase.py-deprecate/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/appbaseio%2Fappbase.py-deprecate/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261978910,"owners_count":23239417,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-06-26T01:05:26.690Z","updated_at":"2025-06-26T01:05:27.907Z","avatar_url":"https://github.com/appbaseio.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Python Wrapper for Appbase\n\nDependencies:\n\n - twisted - https://pypi.python.org/pypi/Twisted\n - requests - http://docs.python-requests.org/en/latest/\n - treq - https://github.com/twisted/treq\n\nImporting\n```\nimport appbase\n```\n\n## 1) Global\n\n```python\n#generate a uuid (client side)\nid = appbase.uuid()\n```\n\n## 1) App Instance\n\n```python\nmyApp = appbase.app('app', 'secret')\n\n#server time - in milliseconds - http://docs.appbase.io/#/v3.0/rest/api-reference#api-reference-global-server-time\ntime = myApp.serverTime()\n\n#search - http://docs.appbase.io/#/v3.0/rest/api-reference#api-reference-global-search-collections\nmyApp.search(query = {})\n```\n\n## 2) Collection\n```python\n#collections - http://docs.appbase.io/#/v3.0/rest/api-reference#api-reference-global-list-collections\narrayOfCollections = myApp.listCollections();\n\n#access\nmyCollection = myApp.collection(\"user\");\nmyCollection.search(query = {}); \n#http://docs.appbase.io/#/v3.0/rest/api-reference#api-reference-collection-search-documents-by-propertyies\n\n#listen - creation/removal of documents in the whole collections\nmyCollection.onDocuments(callbackFunction)\n\n #stop any callback from listening\n myCollection.off(theSamecallbackFunction)\n```\n\n## 3) Documents\n```python\n#1 insert - uses http://docs.appbase.io/#/v3.0/rest/api-reference#api-reference-document-properties-create-update-document-properties\ninserted_doc = myCollection.insert(data)\n\n#2 get one document - http://docs.appbase.io/#/v3.0/rest/api-reference#api-reference-document-properties-read-document-properties\ndata = myCollection.get('id') # returns a dictionary\n# id could be a path as well (\"sagar/tweets/tweet1\")\n\n#3 get all documents document - http://docs.appbase.io/#/v3.0/rest/api-reference#api-reference-collection-list-all-documents\narrayOfdocuments = myCollection.getAll() # returns an array\n\t#3.1 limit and skip (filters)\n\tarrayOfdocuments = myCollection.getAll({limit: 5, skip: 10})\n\n#4 modify  data in a document - http://docs.appbase.io/#/v3.0/rest/api-reference#api-reference-document-properties-create-update-document-properties\nerror = myCollection.set('id', data) \n\t#4.1 error is null if the operation succeeded\n\n#remove property - http://docs.appbase.io/#/v3.0/rest/api-reference#api-reference-document-properties-delete-document-properties\nmyCollection.unset('id', 'propertyName')\nmyCollection.unset('id', [\"property\", \"names\"])\n\n#5 delete a document\nerror = myCollection.delete('id')\n\n#7 set a ref - http://docs.appbase.io/#/v3.0/rest/api-reference#api-reference-document-references-create-update-document-references\nerror = myCollection.setRef('id', 'ref name', \"path\", [priority])  \n\t# error is null if the operation succeeded\n\n#7 get refs of a document - http://docs.appbase.io/#/v3.0/rest/api-reference#api-reference-document-references-read-references\narrayOfReferences = myCollction.getRefs('id')\n  \n  #6.1 filtering refs with a dictionary\n  filters = {startAt: 5, limit: 10}\n  arrayOfReferences = myCollection.getRefs('id', filters)\n\n#8 delete a ref - http://docs.appbase.io/#/v3.0/rest/api-reference#api-reference-document-references-delete-references\nerror = myCollection.unsetRef('name')  \n\t# error is null if the operation succeeded\n\n#9 listen (realtime)\n#properties \nmyCollection.on('id', callbackFunction)\n\n#refs\nmyCollection.onRef('id', callbackFunction)\n\n#creation/removal of documents in the whole collections\nmyCollection.onDocuments(callbackFunction)\n\n#stop any callback from listening\nmyCollection.off(theSamecallbackFunction)\n```\n\nHere's the example usage of these methods: https://github.com/appbaseio/appbase.py/blob/master/test.py\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fappbaseio%2Fappbase.py-deprecate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fappbaseio%2Fappbase.py-deprecate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fappbaseio%2Fappbase.py-deprecate/lists"}