Metadata-Version: 2.1
Name: yellowbox
Version: 0.8.0
Summary: 
Home-page: https://github.com/biocatchltd/yellowbox
License: MIT
Author: biocatch ltd
Requires-Python: >=3.7,<4.0
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Provides-Extra: aerospike
Provides-Extra: azure
Provides-Extra: dev
Provides-Extra: gcs
Provides-Extra: kafka
Provides-Extra: mssql
Provides-Extra: postgresql
Provides-Extra: rabbit
Provides-Extra: redis
Provides-Extra: vault
Provides-Extra: webserver
Provides-Extra: websocket
Requires-Dist: Deprecated (>=1.2.13)
Requires-Dist: SQLAlchemy-Utils (>=0.38.2) ; extra == "postgresql" or extra == "mssql" or extra == "dev"
Requires-Dist: aerospike (>=10.0.1) ; extra == "aerospike" or extra == "dev"
Requires-Dist: azure-storage-blob (>=12.0.0) ; extra == "azure" or extra == "dev"
Requires-Dist: cffi (>=1.14.0) ; extra == "azure" or extra == "dev"
Requires-Dist: docker (>=4.2.0)
Requires-Dist: hvac ; extra == "vault" or extra == "dev"
Requires-Dist: kafka-python ; extra == "kafka" or extra == "dev"
Requires-Dist: pika ; extra == "rabbit" or extra == "dev"
Requires-Dist: psycopg2 (>=2.8.6) ; extra == "postgresql" or extra == "dev"
Requires-Dist: pyodbc (>=4.0.32) ; extra == "dev"
Requires-Dist: redis (>=3.3.0) ; extra == "redis" or extra == "dev"
Requires-Dist: requests
Requires-Dist: simple_websocket_server ; extra == "websocket" or extra == "dev"
Requires-Dist: sqlalchemy (>=1.3.0,<2.0.0) ; extra == "postgresql" or extra == "mssql" or extra == "dev"
Requires-Dist: starlette (>=0.9.0) ; extra == "webserver" or extra == "dev"
Requires-Dist: uvicorn (>=0.13.0) ; extra == "webserver" or extra == "dev"
Requires-Dist: websockets ; extra == "webserver" or extra == "dev"
Requires-Dist: yaspin (>=1.0.0)
Project-URL: Repository, https://github.com/biocatchltd/yellowbox
Description-Content-Type: text/markdown

# Yellowbox
![Test YellowBox](https://github.com/biocatchltd/yellowbox/workflows/Test%20YellowBox/badge.svg?branch=master)
[![Coverage](https://codecov.io/github/biocatchltd/yellowbox/coverage.svg?branch=master)](https://codecov.io/github/biocatchltd/yellowbox?branch=master)


Yellowbox makes it easy to run docker containers as part of black box tests.

**Documentation:** https://yellowbox.readthedocs.io/

---
## Examples
Say you want to run a blackbox test on a service that depends on a redis server.

```python
from yellowbox.clients import docker_client
from yellowbox.extras import RedisService


def test_black_box():
  with docker_client() as docker_client, RedisService.run(docker_client) as redis:
    redis_port = redis.client_port()  # this the host port the redis
    ...  # run your black box test here
  # yellowbox will automatically close the service when exiting the scope


def test_black_box_with_initial_data():
  # you can use the service's built-in utility functions to
  # easily interoperate the service
  with docker_client() as docker_client,
          RedisService.run(docker_client) as redis,
          redis.client() as client:
    client.set("foo", "bar")
  ...
```

## License
Yellowbox is registered under the MIT public license

