https://github.com/gh640/firestore2csv
A Python script to dump Firestore collection data with CSV format.
https://github.com/gh640/firestore2csv
firebase firestore python
Last synced: about 2 months ago
JSON representation
A Python script to dump Firestore collection data with CSV format.
- Host: GitHub
- URL: https://github.com/gh640/firestore2csv
- Owner: gh640
- Created: 2021-01-05T12:16:52.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2021-01-10T06:48:37.000Z (over 5 years ago)
- Last Synced: 2025-03-04T10:25:36.598Z (over 1 year ago)
- Topics: firebase, firestore, python
- Language: Python
- Homepage:
- Size: 3.91 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# `firestore2csv.py`
A Python script to dump Firestore collection data with CSV format.
## Requirements
- Python 3.9
- Poetry 1.x
## Usage
Clone this repo.
```bash
git clone https://github.com/gh640/firestore2csv.git
```
Install dependency packages with [Poetry](https://github.com/python-poetry/poetry).
```bash
cd firestore2csv
poetry install
```
Run the script.
```bash
poetry run python firestore2csv.py \
--cred-file firebase-service-account.json \
--collection-name mycollection \
--fields field_a,field_b,field_c \
--order-by field_c \
--direction ASC
```
Available options (all required):
- `--cred-file`
- `--collection-name`
- `--fields`
- `--order-by`
- `--direction`