https://github.com/tox-dev/devpi-process
https://github.com/tox-dev/devpi-process
hacktoberfest
Last synced: 12 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/tox-dev/devpi-process
- Owner: tox-dev
- License: mit
- Created: 2021-06-17T07:53:39.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2025-04-25T16:41:44.000Z (about 1 year ago)
- Last Synced: 2025-04-25T17:48:35.881Z (about 1 year ago)
- Topics: hacktoberfest
- Language: Python
- Homepage:
- Size: 174 KB
- Stars: 8
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Funding: .github/FUNDING.yml
- License: LICENSE.txt
- Code of conduct: CODE_OF_CONDUCT.md
- Security: .github/SECURITY.md
Awesome Lists containing this project
README
# devpi-process
[](https://pypi.org/project/devpi-process)
[](https://pypi.org/project/devpi-process)
[](https://pypi.org/project/devpi-process)
[](https://pepy.tech/project/devpi-process)
[](https://opensource.org/licenses/MIT)
[](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
```