---
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/local-platform/projects/shared-libraries
markdown: https://www.quantconnect.com/docs/v2/local-platform/projects/shared-libraries.md
language: python
source: https://github.com/QuantConnect/Documentation/tree/master/02%20Local%20Platform/08%20Projects/08%20Shared%20Libraries
modified: 2026-10-29
index: https://www.quantconnect.com/llms.txt
---

# Shared Libraries

[Documentation](https://www.quantconnect.com/docs/v2.md) > [Local Platform](https://www.quantconnect.com/docs/v2/local-platform.md) > Projects > 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. [Open a project](https://www.quantconnect.com/docs/v2/local-platform/projects/getting-started.md#04-Open-Projects).
2. In the left navigation menu, click the ![VS Code QuantConnect icon](https://cdn.quantconnect.com/i/tu/vscode-qc-icon.jpg) **QuantConnect** icon.
3. In the Project panel, click **Add Library**.
4. Click **Create New**.
5. In the **Input Library Name** field, enter a name for the library.
6. Click **Create Library**.
   The template library files are added to a new project in the `Library` directory in your [organization workspace](https://www.quantconnect.com/docs/v2/local-platform/development-environment/organization-workspaces.md).
7. In the left navigation menu, click the ![Local Platform explorer icon](https://cdn.quantconnect.com/i/tu/local-lab-explorer-icon.jpg) **Explorer** icon.
8. In Explorer panel, open the `Library.py` file 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/local-platform/projects/getting-started.md#04-Open-Projects).
2. In the left navigation menu, click the ![](https://cdn.quantconnect.com/i/tu/vscode-qc-icon.jpg) **QuantConnect** icon.
3. In the Project panel, click **Add Library**.
4. Click the **Choose a library...** field and then click a library from the drop-down menu.
5. 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.
6. 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/local-platform/projects/getting-started.md#04-Open-Projects) and then [rename the project](https://www.quantconnect.com/docs/v2/local-platform/projects/getting-started.md#08-Rename-Projects).

## Remove Libraries

Follow these steps to remove a library from your project:

1. [Open the project](https://www.quantconnect.com/docs/v2/local-platform/projects/getting-started.md#04-Open-Projects) that contains the library you want to remove.
2. In the left navigation menu, click the ![](https://cdn.quantconnect.com/i/tu/vscode-qc-icon.jpg) **QuantConnect** icon.
3. 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/local-platform/projects/getting-started.md#12-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.
