DEPLODOCKER
Why?
Poetry and others python dependency managers has no cozy interface to communicate with requirements.
Some of them has no methods for export extras or extras without main requirements.
Some of them has no possibilities to use another format excluding requirements.txt.
This project aims to fix this problem.
FROM python:3.8-alpine AS base
RUN apk update
FROM base AS locker
ADD pyproject.toml .
RUN poetry lock
RUN deplodocker poetry.lock -i poetry -o requirements.txt -d requirements.txt \
&& deplodocker poetry.lock -i poetry -o requirements.txt -d requirements-main.txt -s main \
&& deplodocker poetry.lock -i poetry -o requirements.txt -d requirements-dev.txt -s dev \
&& deplodocker poetry.lock -i poetry -o requirements.txt -d requirements-raw.txt -s raw \
&& deplodocker poetry.lock -i poetry -o requirements.txt -d requirements-binary.txt -s binary \
&& deplodocker poetry.lock -i poetry -o requirements.txt -d requirements-debug.txt -s debug
FROM base AS builder_raw
COPY --from=locker /requirements-raw.txt .
### ...
FROM base AS builder_binary
COPY --from=locker /requirements-binary.txt .
### ...
Basic usage
>>> deplodocker --help
Usage: deplodocker [OPTIONS] [SRC]
Select lock file to work with or use stdin as source
Options:
-d, --dst FILENAME result file [default=stdout]
-i, --input-format TEXT format of input lock file [default=poetry]
-o, --output-format TEXT format of output file [default=requirements.txt]
-s, --section TEXT Section of lock file (multiple) [default=<all>]
--help Show this message and exit.
>>> deplodocker poetry.lock
### MAIN
click==7.1.2
toml==0.10.2
### DEV
appdirs==1.4.4
atomicwrites==1.4.0
attrs==20.3.0
black==20.8b1
...
### SPEEDUPS
orjson==3.4.3
>>> deplodocker poetry.lock -i poetry -o yaml -s main
main:
click: 7.1.2
toml: 0.10.2
>>> deplodocker poetry.lock -i poetry -o json
{"main":{"click":"7.1.2","toml":"0.10.2"},"dev":{"appdirs":"1.4.4","atomicwrites":"1.4.0","attrs":"20.3.0","black":"20.8b1","cfgv":"3.2.0","colorama":"0.4.4","coverage":"5.3","distlib":"0.3.1","filelock":"3.0.12","identify":"1.5.9","iniconfig":"1.1.1","isort":"5.6.4","mypy-extensions":"0.4.3","nodeenv":"1.5.0","packaging":"20.4","pathspec":"0.8.0","pluggy":"0.13.1","pre-commit":"2.8.2","py":"1.9.0","pyparsing":"2.4.7","pytest":"6.1.2","pytest-cov":"2.10.1","pyyaml":"5.3.1","regex":"2020.10.28","six":"1.15.0","typed-ast":"1.4.1","typing-extensions":"3.7.4.3","virtualenv":"20.1.0"},"speedups":{"orjson":"3.4.3"}}
Also you can use stdin as input and choose destination file trough arguments
>>> cat poetry.lock | deplodocker poetry.lock -d requirements.json -i poetry -o json
Metadata
Release files for deplodocker 0.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| deplodocker-0.2.1.tar.gz | 5.5 kB | Without provenance | Details for deplodocker-0.2.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| deplodocker-0.2.1-py3-none-any.whl | Python 3 | none | any | Details for deplodocker-0.2.1-py3-none-any.whl |
Total release size: 11.3 kB
Release files / deplodocker-0.2.1.tar.gz
| Download URL | deplodocker-0.2.1.tar.gz |
|---|---|
| Size | 5.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
704c9507b65b68b15088beb71bf6b72f7d4de99b7e7396240bf311bb8e3e0512
|
|
BLAKE2b-256 checksum How to use checksums |
cf2b21228186cb918a6fb91635357e9da46dce90fd78de0736fd7974d6192035
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.4 CPython/3.8.6 Linux/5.9.3-1-MANJARO
|
Release files / deplodocker-0.2.1-py3-none-any.whl
| Download URL | deplodocker-0.2.1-py3-none-any.whl |
|---|---|
| Size | 5.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2196bf7ea2cc9a84966f414d3f5969be6bf06167f8626d7762102a9c935a4e56
|
|
BLAKE2b-256 checksum How to use checksums |
fe54c4877cce8d4d7a2e431bcb8606f08678b195eaebd66579f4bcaeeb3ebc96
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.4 CPython/3.8.6 Linux/5.9.3-1-MANJARO
|
Security for deplodocker 0.2.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.