Skip to main content

Initialize Layer project

Before you can add content to a Layer project, you must initialize it. This tells Layer which project to associate entities such as datasets and models with.

In your code do the following.

  1. Install the Layer SDK.
  2. Import the Layer SDK with import layer.
  3. Log in to Layer in your notebook.
  4. Run layer.init to access your Layer project:

Example:

import layer
layer.login()
project = layer.init("my_project_name")

If you have not created a project in the web UI already, then Layer automatically creates it for you.

Layer also looks for a README.md file in the same directory as your project and uploads it as the Project Card of your project with layer.init().

You are now ready to add assets to your project or access assets already stored within it.