Skip to main content

firebase-crud

Best Python package to perform CRUD operations with firebase out there.

With firebase-crud, you can used to perform all kind of CRUD operations against firebase node with simple key value based (or) NoSQL based structure for the realtime usage.

Installation

pip install firebase-crud

Usage

firebase crud was programmed in ease-of-use in mind. It can simply import using below

from firebase_crud import Collection

Prequisites

  • Create and configure firebase console application.
  • Generate API/SDK Key on Settings > Service Accounts > Python
  • Configure realtime database path.

Once you have done with this configuration, you can easily initiate firebase using this package. But you have to prepare some things for the initialization.

  • API Key - Path for the generated JSON file from firebase.
  • Firebase URL - This url can be found in realtime database page on your firebase console.
  • Collection Name - Usually single firebase project can have multiple collection/nodes. so you have to specify name for each collection.
  • Unique Id - Firebase will generate some random unique key and which we cannot use to perform CRUD operations. So we need to init with some key as unique.

Initialization

sample_collection = Collection(api_key, path, 'ToDo', 'id')

Methods

Here you can find the list of methods available in this package.

Name Description Input Output
insert(value) To add/insert new items into collection dict: {'id':1, 'task':'Task'} Boolean
getAllValues() To get all the items as list None list
GetValue() To get the item by unique value id: 1 dict or None
deleteAll() To delete all the items in the collection None Boolean
update(self, unique_key, value) To update an item in the collection unique_key: 1, dict: {'id':1, 'task':'Task'} Boolean
delete(unique_key) To delete an item from the collection unique_key: 1 Boolean

Development

Want to contribute? Great!

Create pull request from the github repository and assign it to me.

License

MIT License

Copyright (c) 2022 Jeganath PV

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Free Software, Hell Yeah!

Metadata

Release files for firebase-crud 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for firebase-crud 1.0.0
File Size Uploaded
firebase-crud-1.0.0.tar.gz 4.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for firebase-crud 1.0.0
File Interpreter ABI Platform
firebase_crud-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 9.7 kB

Release files / firebase-crud-1.0.0.tar.gz

Download URL firebase-crud-1.0.0.tar.gz
Size 4.3 kB
Tags Source
SHA-256 checksum
How to use checksums
b33b09faef66b9b6e5dbfbb0714549a55714cd018ad100925877f850273dedee
BLAKE2b-256 checksum
How to use checksums
a261996a60903921e1a197d9bf92b830de6f4fffd731ecc7bcfddcc7a8b4685a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.9

Release files / firebase_crud-1.0.0-py3-none-any.whl

Download URL firebase_crud-1.0.0-py3-none-any.whl
Size 5.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e1548606fcf1d8a0860d863b965c0585a1e032603690fe9f10cceeadaac70efe
BLAKE2b-256 checksum
How to use checksums
3a80f6c091492ea639a9f78086fd37356d20a6639f06feb26b51480191177c94
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.9

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page