# Introducing Code Snippets: Reuse Your Best Code Across Notebooks 🚀

**URL:** <https://forum.anaconda.com/t/introducing-code-snippets-reuse-your-best-code-across-notebooks/87740>\
**Category:** Software Releases\
**Tags:** python, notebooks\
**Created:** [November 11, 2024, 12:01pm UTC](https://forum.anaconda.com/t/introducing-code-snippets-reuse-your-best-code-across-notebooks/87740 "2024-11-11T12:01:37Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![JackEvans](https://dub1.discourse-cdn.com/anaconda/user_avatar/forum.anaconda.com/jackevans/32/5088_2.png) [@JackEvans](https://forum.anaconda.com/u/JackEvans)\
**Post date:** [November 11, 2024, 12:01pm UTC](https://forum.anaconda.com/t/introducing-code-snippets-reuse-your-best-code-across-notebooks/87740/1 "2024-11-11T12:01:37Z")

</div>

Hey Anaconda Community!

We’re excited to announce the release of Code Snippets, a powerful new feature that lets you save, organize, and reuse your most valuable code blocks across all your Jupyter notebooks. No more digging through old notebooks or rewriting the same code patterns – your favorite code is now just one click away.

Need to share that killer python function with a colleague? Don’t Slack it to them, just add it to a Code Snippet!

Check out our example notebook here:

[![](https://europe1.discourse-cdn.com/anaconda/original/2X/a/a766c4773ebca36c0d2758c6439d41b41fcfb3d4.png)](https://anaconda.cloud/api/nbserve/launch_notebook?nb_url=https%3A%2F%2Fanaconda.cloud%2Fapi%2Fprojects%2Fcee5f64d-0c0e-42a9-8f6b-3519718f8ce3%2Ffiles%2FSnippets%20Examples.ipynb%3Fversion%3D94539771-2642-433e-9e7d-8cbf82ce725b)

## What is Code Snippets?

![image](https://europe1.discourse-cdn.com/anaconda/original/2X/2/25384a6c0e0f09c1ba3376d928a3d33b4bb7c9cb.png)

Code Snippets is a built-in sidebar extension for Anaconda Notebooks that allows you to:

- Save any code cell as a reusable snippet
- Search through your snippet library
- Insert snippets into any notebook with one click

 ![image](https://europe1.discourse-cdn.com/anaconda/original/2X/8/89f9ca18500dcb738e8b584941c9efe4a3cfb48a.jpeg)

## Key Features 🔥

- Select any cell, or highlight a specific line of code, then hit the Code Snippets icon to save
- One-click insertion into notebooks
- Edit and version tracking, just double click to view the .py file.
- Powerful search functionality
- Share snippets with your team

## Getting Started 🚀

1. Go to [Anaconda Cloud Notebooks](https://nb.anaconda.cloud). You’ll need an Anaconda account first.

2. Open any Jupyter Notebook and find a cell that you want to save.

3. Save your first snippet by hitting the Code Snippets icon. Give it a descriptive name so that you can find it easily later!  
 ![image](https://europe1.discourse-cdn.com/anaconda/original/2X/2/25384a6c0e0f09c1ba3376d928a3d33b4bb7c9cb.png)

4. Hit the Play icon to insert the Code Snippet into your notebook.  

## Real-World Use Cases 💡

### Data Scientists

- Store common preprocessing steps
- Save visualization templates
- Keep model evaluation metrics handy
- Maintain consistent data cleaning patterns

### Researchers

- Reuse experiment setups
- Store common statistical tests
- Keep plotting configurations
- Maintain methodology templates

### Teams

- Share best practices
- Maintain coding standards
- Store styled Markdown cells to make your Notebooks clean, but colorful
- Distribute common utilities
- Collaborate on code patterns

## Documentation & Resources 📚

- [Video Tutorial](https://youtu.be/BO7nDxs_GFk?feature=shared)
- [Blog Post](https://www.anaconda.com/blog/the-power-of-code-snippets)
- [Feature Request & Bug Reports](https://forum.anaconda.com/c/product-help/notebooks)

## Share Your Feedback! 💬

We built Code Snippets based on your feedback, and we want to keep improving it for you. Try it out and let us know:

- What are your favorite use cases?
- What features would you like to see?
- How can we make it even better?

## Installation Notes 🔧

- This feature is currently only available on Anaconda Cloud Notebooks, but we’ll be rolling it out to Anaconda Navigator users via the Anaconda Toolbox in the New Year so follow this thread for updates!

Happy coding! 🎉

_- The Anaconda Team_

---

<div class="post-metadata">

**Author:** ![JackEvans](https://dub1.discourse-cdn.com/anaconda/user_avatar/forum.anaconda.com/jackevans/32/5088_2.png) [@JackEvans](https://forum.anaconda.com/u/JackEvans)\
**Post date:** [May 8, 2025, 8:11am UTC](https://forum.anaconda.com/t/introducing-code-snippets-reuse-your-best-code-across-notebooks/87740/2 "2025-05-08T08:11:53Z")

</div>

**This feature is now available locally as well!**

Install or update the Anaconda Toolbox to the latest version to start working with Code Snippets in your local Jupyter Notebooks too.

To install:

- Run `conda install anaconda-toolbox`  
Or
- Install via Anaconda Navigator

To update:

- Run `conda update anaconda-toolbox`  
or
- Click the cog icon on the tile in Navigator, and select `Update Application`  
 ![image](https://europe1.discourse-cdn.com/anaconda/original/2X/2/2a507ea448bf1131d1765a7e69d967acc44ba529.png)

Happy coding! 🎉

_- The Anaconda Team_
