Libraries

Project Libraries

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.
  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.
  5. Click Create Library.
  6. The template library files are added to your project. View the files in the Explorer panel.

  7. In the right navigation menu, click the Explorer icon.
  8. In Explorer panel, open the Library.pyLibrary.cs file and implement your library.
  9. Import the library into your project to use the library.
  10. from library import Library

Add Libraries

Follow these steps to add a library to your project:

  1. Open a project.
  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.
  5. The library files are added to your project. To view the files, in the right navigation menu, click the Explorer icon.

  6. Import the library into your project to use the library.
  7. from library import Library

Rename Libraries

To rename a library, open the library project file and then rename the project.

Remove Libraries

Follow these steps to remove a library from your project:

  1. Open the project that contains the library that you want to remove.
  2. In the Project panel, hover over the library name and then click the trash can icon that appears.
  3. The library files are removed from your project.

Delete Libraries

To delete a library, delete the library project file.

You can also see our Videos. You can also get in touch with us via Discord.

Did you find this page helpful?

Contribute to the documentation: