Skip to main content

Fast prototyping for FireStore

Project description

Fire-Prox

CI Coverage Documentation Python 3.12+ License: MIT Code style: ruff

Setup

Before running tests or using the project, make sure to install all dependencies:

# Install Python dependencies
uv sync --frozen

# Install Node.js dependencies (for Firebase tools)
pnpm install

Testing

The project includes a flexible test runner that makes it easy to pass additional parameters to pytest while running Firebase emulators. The test runner launches a local Firestore emulator that Python code is configured to interact with by default and then tears down the emulator once the unit tests are done.

VSCode & Demo Notebooks

For running test in vscode or using the demo notebooks, you need to launch the developer emulator using pnpm developer-emulator.

Running Tests

You can run tests in several ways:

# Using the bash script directly
./test.sh

# Using npm/pnpm (calls the bash script)
pnpm test

# With additional pytest parameters
./test.sh -v                     # Verbose output
./test.sh -k test_specific       # Run specific test
./test.sh --tb=short            # Short traceback format
./test.sh -v -k test_fire_prox  # Combine multiple options

The test script automatically starts Firebase emulators and runs your tests within that environment, then cleans up afterward.

Firestore Test Harness

Tests can rely on the firestore_test_harness pytest fixture (published in fire_prox.testing) to ensure the emulator database is fully deleted both before a test starts and after it finishes. The harness can also be used as a context manager when writing ad-hoc scripts:

from google.cloud import firestore
from fire_prox.testing import firestore_harness

with firestore_harness() as harness:
    client = firestore.Client(project=harness.project_id)
    # interact with Firestore here

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

fire_prox-0.4.0.tar.gz (691.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fire_prox-0.4.0-py3-none-any.whl (58.9 kB view details)

Uploaded Python 3

File details

Details for the file fire_prox-0.4.0.tar.gz.

File metadata

  • Download URL: fire_prox-0.4.0.tar.gz
  • Upload date:
  • Size: 691.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-httpx/0.28.1

File hashes

Hashes for fire_prox-0.4.0.tar.gz
Algorithm Hash digest
SHA256 a3999dd15b084eefc3aa274d614461aeb245b3dbb13f6180cc360dd4f932fdec
MD5 325cfa8070d2a5560a0ebeb8ec0817ec
BLAKE2b-256 4eba28c1cebad85e6d94ed15001c957e9719a06d7ab0706350b78f45d4113299

See more details on using hashes here.

File details

Details for the file fire_prox-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: fire_prox-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 58.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-httpx/0.28.1

File hashes

Hashes for fire_prox-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c811c3ee4edf8085f1c2c24f03d1c2232cf677bdd4434a4afd97c31cea37aaa0
MD5 4e44c9d9bb51f14bec6f5063b2aa3300
BLAKE2b-256 b6acdb1fa778d7fbd0814394ee9eeff3378869f87c59da054f6291f766a8c91e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page