Skip to main content

Import packages from the root of a monorepo

Project description

Import packages from the root of a monorepo

Instructions:

  1. First create a file named .monorepo_root at the root of your monorepo.
  2. 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


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.1.tar.gz (1.8 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page