SkillAgentSearch skills...

Unidep

Single source of truth with requirements for pip and conda

Install / Use

/learn @basnijholt/Unidep
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

🚀 UniDep - Unified Conda and Pip Dependency Management 🚀

UniDep logo

PyPI Build Status CodeCov GitHub Repo stars Documentation Python Bytes

UniDep streamlines Python project dependency management by unifying Conda and Pip packages in a single system. Learn when to use UniDep in our FAQ.

Handling dependencies in Python projects can be challenging, especially when juggling Python and non-Python packages. This often leads to confusion and inefficiency, as developers juggle between multiple dependency files.

  • 📝 Unified Dependency File: Use either requirements.yaml or pyproject.toml to manage both Conda and Pip dependencies in one place.
  • ⚙️ Build System Integration: Integrates with Setuptools and Hatchling for automatic dependency handling during pip install ./your-package.
  • 💻 One-Command Installation: unidep install handles Conda, Pip, and local dependencies effortlessly.
  • ⚡️ Fast Pip Operations: Leverages uv (if installed) for faster pip installations.
  • 🏢 Monorepo-Friendly: Render (multiple) requirements.yaml or pyproject.toml files into one Conda environment.yaml file and maintain fully consistent global and per sub package conda-lock files.
  • 🌍 Platform-Specific Support: Specify dependencies for different operating systems or architectures.
  • 🔧 pip-compile Integration: Generate fully pinned requirements.txt files from requirements.yaml or pyproject.toml files using pip-compile.
  • 🔒 Integration with conda-lock: Generate fully pinned conda-lock.yml files from (multiple) requirements.yaml or pyproject.toml file(s), leveraging conda-lock.
  • 🥧 Pixi Support: Generate pixi.toml files from your dependency files, enabling Pixi-based workflows while keeping UniDep as the single source of truth.
  • 🤓 Nerd stats: written in Python, >99% test coverage, fully-typed, all Ruff's rules enabled, easily extensible, and minimal dependencies

unidep is designed to make dependency management in Python projects as simple and efficient as possible. Try it now and streamline your development process!

[!TIP] Check out the example requirements.yaml and pyproject.toml below.

<!-- toc-start -->

:books: Table of Contents

<!-- START doctoc generated TOC please keep comment here to allow auto update --> <!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE --> <!-- END doctoc generated TOC please keep comment here to allow auto update --> <!-- toc-end -->

:rocket: Bootstrap from Scratch

To get started quickly with UniDep, run the following command. This will download and install micromamba (recommended for fast Conda environment management), uv (recommended for faster pip installations), and then install UniDep:

"${SHELL}" <(curl -LsSf raw.githubusercontent.com/basnijholt/unidep/main/bootstrap.sh)

[!NOTE] Micromamba and uv are recommended to optimize your installation experience, but they are not required if you prefer to use your existing Conda and pip setup.

[!WARNING] NEVER! run scripts from the internet without understanding what they do. Always inspect the script first!

<details> <summary>Pin the hash of the bootstrap script with:</summary> <!-- CODE:BASH:START --> <!-- HASH=$(git log -n 1 --pretty=format:"%H" -- bootstrap.sh) --> <!-- echo '```bash' --> <!-- echo '"${SHELL}"' '<(curl -LsSf raw.githubusercontent.com/basnijholt/unidep/'"$HASH"'/bootstrap.sh)' --> <!-- echo '```' --> <!-- CODE:END --> <!-- OUTPUT:START --> <!-- ⚠️ This content is auto-generated by `markdown-code-runner`. -->
"${SHELL}" <(curl -LsSf raw.githubusercontent.com/basnijholt/unidep/939246571b65004391c425eb6df713303663054a/bootstrap.sh)
<!-- OUTPUT:END --> </details>

:package: Installation

To install unidep, run one of the following commands that use pipx (recommended), pip, or conda:

pipx install "unidep[all]"  # Recommended (install as a standalone CLI)

or

pip install "unidep[all]"

or

conda install -c conda-forge unidep

:memo: requirements.yaml and pyproject.toml structure

unidep allows either using a

  1. requirements.yaml file with a specific format (similar but not the same as a Conda environment.yaml file) or
  2. pyproject.toml file with a [tool.unidep] section.

Both files contain the following keys:

  • name (Optional): For documentation, not used in the output.
  • channels: List of conda channels for packages, such as conda-forge.
  • dependencies: Mix of Conda and Pip packages.
  • local_dependencies (Optional): List of paths to other requirements.yaml or pyproject.toml files to include.
  • optional_dependencies (Optional): Dictionary with lists of optional dependencies.
  • platforms (Optional): List of platforms that are supported (used in conda-lock).

Whether you use a requirements.yaml or pyproject.toml file, the same information can be specified in either. Choose the format that works best for your project.

Example

Example requirements.yaml

Example of a requirements.yaml file:

name: example_environment
channels:
  - conda-forge
dependencies:
  - numpy                   # same name on c

Related Skills

View on GitHub
GitHub Stars242
CategoryDevelopment
Updated16h ago
Forks8

Languages

Python

Security Score

100/100

Audited on Mar 28, 2026

No findings