---
title: "Shared Libraries"
description: "Libraries are QuantConnect projects you can merge into your project to avoid duplicating code files. Use libraries to share tools across several projects."
canonical: https://www.quantconnect.com/docs/v2/cloud-platform/projects/shared-libraries
markdown: https://www.quantconnect.com/docs/v2/cloud-platform/projects/shared-libraries.md
language: python
source: https://github.com/QuantConnect/Documentation/tree/master/01%20Cloud%20Platform/06%20Projects/09%20Shared%20Libraries
modified: 2026-10-30
index: https://www.quantconnect.com/llms.txt
---

# Shared Libraries

[Documentation](https://www.quantconnect.com/docs/v2.md) > [Cloud Platform](https://www.quantconnect.com/docs/v2/cloud-platform.md) > [Projects](https://www.quantconnect.com/docs/v2/cloud-platform/projects.md) > Shared Libraries

> Code examples are shown in Python. Append `?lang=csharp` to this URL for the C# version of this page.

## Introduction

Project libraries are QuantConnect projects you can merge into your project to avoid duplicating code files. If you have tools that you use across several projects, create a library.

## Create Libraries

Follow these steps to create a library:

1. [Create a new project](https://www.quantconnect.com/docs/v2/cloud-platform/projects/getting-started.md#03-Create-Projects).
2. In the project panel, click **Add Library**.
3. Click **Create New**.
4. In the **Input Library Name** field, enter a name for the library (for example, `Calculators`).
   To create a library directory, set the name to `directoryName / libraryName` (for example, `Tools / Calculators`).
5. Click **Create Library**.
   The template library files are added to your project. View the files in the Explorer panel.
6. In the right navigation menu, click the ![Explorer icon](https://cdn.quantconnect.com/i/tu/local-lab-explorer-icon.jpg) **Explorer** icon.
7. In Explorer panel, open the `Library.py` file, rename it to reflect its purpose (e.g.: `TaxesCalculator.py`), and implement your library.

## Add Libraries

Follow these steps to add a library to your project:

1. [Open the project](https://www.quantconnect.com/docs/v2/cloud-platform/projects/getting-started.md#02-View-All-Projects).
2. In the Project panel, click **Add Library**.
3. Click the **Choose a library...** field and then click a library from the drop-down menu.
4. Click **Add Library** (e.g. `Calculators`).
   The library files are added to your project. To view the files, in the right navigation menu, click the ![](https://cdn.quantconnect.com/i/tu/local-lab-explorer-icon.jpg) **Explorer** icon.
5. Import the library into your project to use the library.
   ```python
   from Calculators.TaxesCalculator import TaxesCalculator
   class AddLibraryAlgorithm(QCAlgorithm):
       taxes_calculator = TaxesCalculator()
   ```

## Rename Libraries

To rename a library, [open the library project file](https://www.quantconnect.com/docs/v2/cloud-platform/projects/getting-started.md#02-View-All-Projects) and then [rename the project](https://www.quantconnect.com/docs/v2/cloud-platform/projects/getting-started.md#07-Rename-Projects).

## Remove Libraries

Follow these steps to remove a library from your project:

1. [Open the project](https://www.quantconnect.com/docs/v2/cloud-platform/projects/getting-started.md#02-View-All-Projects) that contains the library you want to remove.
2. In the Project panel, hover over the library name and then click the **trash can** icon that appears.
   ![Delete a library from a project](https://cdn.quantconnect.com/i/tu/delete-libraries.png)
   The library files are removed from your project.

## Delete Libraries

To delete a library, [delete the library project file](https://www.quantconnect.com/docs/v2/cloud-platform/projects/getting-started.md#11-Delete-Projects).

## Best Practices

Each library is a project, so it has its own [file quota](https://www.quantconnect.com/docs/v2/cloud-platform/projects/files.md#10-Quotas). If a project outgrows its quota, move part of the code into a library.

Libraries are shared, so when you edit one, every project that uses it picks up the change. Add code to a library when it's stable and several projects need it. Keep work in progress and code that only one project uses in the project itself.
