Import packages from the root of a monorepo
Project description
Import packages from the root of a monorepo
Instructions:
- First create a file named
.monorepo_root
at the root of your monorepo. - Use
monorepo.load_package
to load packages from anywhere in your monorepo.
Example usage:
import monorepo
# The `load_package` function will search up from the current directory for a
# file named `.monorepo_root`, which is used to determine the root directory
# from which to load `example.package.foo`:
foo = monorepo.load_package("example.package.foo")
# The foo package can be used directly:
foo.bar_function()
# We can also import other subpackages:
from foo.bar import baz
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
monorepo-0.1.0.tar.gz
(2.4 kB
view hashes)