| Name | fakebigtable JSON |
| Version |
0.1.5
JSON |
| download |
| home_page | None |
| Summary | Fakes bigtable ops for tests |
| upload_time | 2024-08-28 23:14:53 |
| maintainer | None |
| docs_url | None |
| author | erik aronesty |
| requires_python | <4.0,>=3.11 |
| license | MIT |
| keywords |
|
| VCS |
 |
| bugtrack_url |
|
| requirements |
No requirements were recorded.
|
| Travis-CI |
No Travis.
|
| coveralls test coverage |
No coveralls.
|
# fakebigtable
A mock implementation of Google Cloud Bigtable client for testing for when the overhead of using the emulator is too much for a small project.
Unit tests are written to prove emulator parity. We use the emulator so you don't have to.
## Install
```
pip install fakebigtable
```
## Usage with pytest
```python
import pytest
from google.cloud import bigtable
from fakebigtable import FakeBigtableClient
@pytest.fixture(autouse=True)
def mock_bigtable(monkeypatch):
monkeypatch.setattr(bigtable, "Client", FakeBigtableClient)
def test_bigtable_operations():
client = bigtable.Client(project="test-project")
instance = client.instance("test-instance")
table = instance.table("test-table")
# Perform operations on table
```
## Usage with unittest
```python
import unittest
from unittest.mock import patch
from google.cloud import bigtable
from fakebigtable import FakeBigtableClient
class TestBigtableOperations(unittest.TestCase):
@patch('google.cloud.bigtable.Client', FakeBigtableClient)
def test_bigtable_operations(self):
client = bigtable.Client(project="test-project")
instance = client.instance("test-instance")
table = instance.table("test-table")
# Perform operations on table
```
Raw data
{
"_id": null,
"home_page": null,
"name": "fakebigtable",
"maintainer": null,
"docs_url": null,
"requires_python": "<4.0,>=3.11",
"maintainer_email": null,
"keywords": null,
"author": "erik aronesty",
"author_email": "erik@q32.com",
"download_url": "https://files.pythonhosted.org/packages/45/59/023dd28e454955850c8bab6270efbf6acef160417bc8396c4eec254ba238/fakebigtable-0.1.5.tar.gz",
"platform": null,
"description": "# fakebigtable\n\nA mock implementation of Google Cloud Bigtable client for testing for when the overhead of using the emulator is too much for a small project.\nUnit tests are written to prove emulator parity. We use the emulator so you don't have to.\n\n## Install\n\n```\npip install fakebigtable\n```\n\n## Usage with pytest\n\n```python\nimport pytest\nfrom google.cloud import bigtable\nfrom fakebigtable import FakeBigtableClient\n\n@pytest.fixture(autouse=True)\ndef mock_bigtable(monkeypatch):\n monkeypatch.setattr(bigtable, \"Client\", FakeBigtableClient)\n\ndef test_bigtable_operations():\n client = bigtable.Client(project=\"test-project\")\n instance = client.instance(\"test-instance\")\n table = instance.table(\"test-table\")\n # Perform operations on table\n```\n\n## Usage with unittest\n\n```python\n\nimport unittest\nfrom unittest.mock import patch\nfrom google.cloud import bigtable\nfrom fakebigtable import FakeBigtableClient\n\nclass TestBigtableOperations(unittest.TestCase):\n @patch('google.cloud.bigtable.Client', FakeBigtableClient)\n def test_bigtable_operations(self):\n client = bigtable.Client(project=\"test-project\")\n instance = client.instance(\"test-instance\")\n table = instance.table(\"test-table\")\n # Perform operations on table\n```\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Fakes bigtable ops for tests",
"version": "0.1.5",
"project_urls": {
"homepage": "https://github.com/puzzlefin/fakebigtable"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "e3481ab7bdafa3c7e626ff3dcc270742557f9af4e54ea684a536d1b005a86d84",
"md5": "959e6f271c029a27e2da0537247ed617",
"sha256": "24aa822c79511726c3d406dea98ee7892ff7eb8abd48743cf64e14b6d909d741"
},
"downloads": -1,
"filename": "fakebigtable-0.1.5-py3-none-any.whl",
"has_sig": false,
"md5_digest": "959e6f271c029a27e2da0537247ed617",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.11",
"size": 3771,
"upload_time": "2024-08-28T23:14:51",
"upload_time_iso_8601": "2024-08-28T23:14:51.718033Z",
"url": "https://files.pythonhosted.org/packages/e3/48/1ab7bdafa3c7e626ff3dcc270742557f9af4e54ea684a536d1b005a86d84/fakebigtable-0.1.5-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "4559023dd28e454955850c8bab6270efbf6acef160417bc8396c4eec254ba238",
"md5": "4106a6686ff54d97337d017df95c9464",
"sha256": "dd45d11a485efbec3690a1ea92ef54707ac50cd12c5a599e34a2af68f6d38bef"
},
"downloads": -1,
"filename": "fakebigtable-0.1.5.tar.gz",
"has_sig": false,
"md5_digest": "4106a6686ff54d97337d017df95c9464",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.11",
"size": 3340,
"upload_time": "2024-08-28T23:14:53",
"upload_time_iso_8601": "2024-08-28T23:14:53.308337Z",
"url": "https://files.pythonhosted.org/packages/45/59/023dd28e454955850c8bab6270efbf6acef160417bc8396c4eec254ba238/fakebigtable-0.1.5.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-08-28 23:14:53",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "puzzlefin",
"github_project": "fakebigtable",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "fakebigtable"
}