semvec/pypi-packages huggingface dataset:
pytest-xdist-gnumake 1.0.0
A small example package
Requires Python: >=3.11

# pytest-xdist-gnumake

## Integration of pytest-xdist with GNU Make job server

Imagine you have a *Makefile* target that runs pytest in addition to
other tests:

	test: test-python test-mypy

    test-python:
	    pytest --numprocesses=8 my_app

	test-mypy:
	    mypy my_app
		
Conveniently, you just have to run ``make test`` to run both test
targets. To save time, you can even run ``make -j8 test`` (8 being the
number of cpu cores that you have at your disposal in this example) to
run everything in parallel. But what really happens now is that

* ``make`` knows it has 8 slots available, and starts pytest and mypy
  in parallel
  
* mypy runs on one cpu core

* pytest-xdist starts its own job server with 8 parallel workers

In effect you now are running 9 parallel processes, one more than
anticipated. This does not matter too much in this simplified example,
but if you have big testsuites then you would like to avoid that.

The solution to this issue is this pytest-xdist plugin, which makes
the pytest-xdist workers communicate with the GNU make jobserver to
avoid exceeding the total limit.


## Installation

Simply `pip install pytest-xdist-gnumake`, and the plugin should be
picked up automatically by pytest-xdist.


## Limitations

### Local execution only

The GNU jobserver uses the local file system (a fifo in ``/tmp``), so
this will not work with remote xdist workers.


### Needs modern make

Older make versions relied on passing open file descriptors to child
process, but pytest-xdist will always close those. You need 
GNU make >= 4.4 in order for the communication with the jobserver 
to work, that is, a version of make that uses the fifo jobserver. See
https://www.gnu.org/software/make/manual/html_node/POSIX-Jobserver.html
for details.

If your make version is too old then the plugin will print:

    $ pytest --numprocesses=8 my_app
    pytest-xdist-gnumake using dummy job server: no job server found

and tests will run as if the plugin was not installed. Otherwise, it
will print:

    $ pytest --numprocesses=8 my_app
    pytest-xdist-gnumake using gnu make jobserver client


## Acknowledgements

* GNU Make https://www.gnu.org/software/make/
* https://pytest.org and https://github.com/pytest-dev/pytest-xdist to
  parallelize Python testsuites
* https://github.com/milahu/gnumake-tokenpool to communicate with GNU Make
gemini-public-api 0.11.3
⚠️ This package is no longer maintained. No future updates will be released.
Requires Python: <4.0,>=3.9

[![codecov](https://codecov.io/gh/mpol1t/gemini-public-api/branch/main/graph/badge.svg?token=LV1BARCUF9)](https://codecov.io/gh/mpol1t/gemini-public-api)
![PyPI - Python Version](https://img.shields.io/pypi/pyversions/gemini-public-api)
![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/mpol1t/gemini-public-api/python-app.yml)
![GitHub](https://img.shields.io/github/license/mpol1t/gemini-public-api)

⚠️ **This project is archived and no longer maintained.** ⚠️

This repository and the associated PyPI package (`gemini-public-api`) are no longer supported. No future updates will be released.

Feel free to fork or take over maintenance if needed.

# Gemini Public API 

The gemini-public-api is an unofficial Python implementation of the public Gemini REST API. It provides a simple interface for interacting with the Gemini cryptocurrency exchange, supporting both synchronous and asynchronous communication.


## Installation

To get the Gemini Public API Python client running on your local machine, use pip:

```
pip3 install gemini-public-api
```

Please make sure that you have Python 3.6 or newer, as this library requires it.

## Usage

### Synchronous Usage

```python
from gemini_public_api import api

symbols = api.get_symbols()
print(symbols.json())
```

### Asynchronous Usage

The library relies on the `aiohttp` package for truly asynchronous execution. The `SessionContextManager` context manager is used for making async requests. Here's how to fetch the available symbols asynchronously:

```python
from gemini_public_api.aiohttp import api
from gemini_public_api.aiohttp.session_context_manager import SessionContextManager

async with SessionContextManager() as session:
    response = await api.get_symbols(session)
    
    async with response as resp:
        data = await resp.json()
        print(data)
```

Alternatively, without the context manager:

```python
import aiohttp

from gemini_public_api.aiohttp import api

session = aiohttp.ClientSession()

response = await api.get_symbols(session)
 
async with response as resp:
   data = await resp.json()
   print(data)

await session.close()
```

## Dependencies

`gemini-public-api` is built with:

* [poetry](https://python-poetry.org/docs/) -  A tool for dependency management and packaging in Python.
* [hypothesis](https://hypothesis.readthedocs.io/en/latest/) - A powerful, flexible, and easy-to-use library for property-based testing.
* [requests](https://docs.python-requests.org/en/latest/) - The definitive library for making HTTP requests in Python.
* [aiohttp](https://docs.aiohttp.org/en/stable/) - An asynchronous HTTP client/server framework for asyncio and Python.

## Authors

* **mpol1t**

## License

This project is licensed under the MIT License