Skip to main content

Easily transfer data between firebase projects

Project description

firebase-data

pypi Open In Colab Try it on gitpod

Easily transfer data between firebase projects.

⚠️ This package is still in early development. Read the code before running (especially on production environments).

Why another Firebase data management tool

  • Existing ones don't provide features to handle inter-project data management.
  • Official solution does not allow eu/us data movement

Install

pip install firebase-data

Usage

Export collection

fdata export --service_account_path=./svc.dev.json --collection=foos --output_path=./data

Import collection

fdata import --service_account_path=./svc.prod.json --collection=foos --input_path=./data

Export authentication

fdata auth:export --service_account_path=./svc.dev.json --output_path=./data

Delete

No need to reinvent the wheel here, use firebase-cli.

export GOOGLE_APPLICATION_CREDENTIALS=./svc.dev.json
firebase use my-project
firebase firestore:delete foos --recursive

Warning

  • Not optimized for large collections (your PC will explose)
  • Only one collection depth, i.e. foos/{fooId}/bars/{barId}

TODOS

  • import/export Firestore (depth one)
  • export Firebase authentication
  • delete Firebase collection
  • import Firebase authentication
  • use transactions
  • parallelize/optimize
  • import+export as single call
  • other firebase data

Development

Install

firebase login
firebase init

How to release

  1. Update version in setup.py
  2. git add .
  3. git commit -m "my message"
  4. git push
  5. git tag v1.0.0
  6. git push origin v1.0.0

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

firebase-data-1.0.5.tar.gz (4.6 kB view hashes)

Uploaded Source

Built Distribution

firebase_data-1.0.5-py3-none-any.whl (6.2 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