Metadata-Version: 2.4
Name: devpi-process
Version: 1.1.0
Summary: devpi process provides a programmatic API to create and use a devpi server process
Project-URL: Homepage, https://github.com/tox-dev/devpi-process#readme
Project-URL: Source, https://github.com/tox-dev/devpi-process
Project-URL: Tracker, https://github.com/tox-dev/devpi-process/issues
Author-email: Bernát Gábor <gaborjbernat@gmail.com>
Maintainer-email: Bernát Gábor <gaborjbernat@gmail.com>
License-Expression: MIT
License-File: LICENSE.txt
Keywords: environments,isolated,testing,virtual
Classifier: Development Status :: 5 - Production/Stable
Classifier: Framework :: tox
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: MacOS :: MacOS X
Classifier: Operating System :: Microsoft :: Windows
Classifier: Operating System :: POSIX
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Software Development :: Libraries
Classifier: Topic :: Software Development :: Testing
Classifier: Topic :: Utilities
Requires-Python: >=3.10
Requires-Dist: devpi-client>=7.2
Requires-Dist: devpi-server>=6.17
Requires-Dist: typing-extensions>=4.15; python_version < '3.11'
Provides-Extra: testing
Requires-Dist: covdefaults>=2.3; extra == 'testing'
Requires-Dist: httpx>=0.28.1; extra == 'testing'
Requires-Dist: pytest-cov>=7; extra == 'testing'
Requires-Dist: pytest>=8.4.2; extra == 'testing'
Description-Content-Type: text/markdown

# devpi-process

[![PyPI](https://img.shields.io/pypi/v/devpi-process?style=flat-square)](https://pypi.org/project/devpi-process)
[![PyPI - Implementation](https://img.shields.io/pypi/implementation/devpi-process?style=flat-square)](https://pypi.org/project/devpi-process)
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/devpi-process?style=flat-square)](https://pypi.org/project/devpi-process)
[![Downloads](https://static.pepy.tech/badge/devpi-process/month)](https://pepy.tech/project/devpi-process)
[![PyPI - License](https://img.shields.io/pypi/l/devpi-process?style=flat-square)](https://opensource.org/licenses/MIT)
[![check](https://github.com/tox-dev/devpi-process/actions/workflows/check.yaml/badge.svg)](https://github.com/tox-dev/devpi-process/actions/workflows/check.yaml)

Allows you to create [devpi](https://devpi.net/docs/devpi/devpi/stable/+d/index.html) server process with indexes, and
upload artifacts to that programmatically.

## install

```sh
pip install devpi-process
```

## use

```python
from pathlib import Path

from devpi_process import Index, IndexServer

with IndexServer(Path("server-dir")) as server:
    # create an index mirroring an Artifactory instance
    magic_index_url = "https://magic.com/artifactory/api/pypi/magic-pypi/simple"
    base_name = "magic"
    server.create_index(base_name, "type=mirror", f"mirror_url={magic_index_url}")

    # create a dev index server that bases of magic PyPI, and upload a wheel to it
    dev: Index = server.create_index("dev", f"bases={server.user}/{base_name}")
    dev.upload("magic-2.24.0-py3-none-any.whl")

    assert dev.url  # point the tool consuming the index server to this
```
