---
title: "Environment"
description: "Environment"
url: "https://www.contentstack.com/docs/developers/sdks/content-management-sdk/python/reference/environment"
product: "Contentstack"
doc_type: "guide"
audience:
  - developers
  - admins
version: "current"
last_updated: "2026-09-20"
---

# Environment

## Environment

An [environment](/docs/headless-cms/about-environments) allows users to publish their content on the destination URL. After you create an entry, you will publish it in an environment. After publishing, you will see the content on your website’s URL (specified in the environment). Being not limited to a single environment, you can publish content on multiple environments too.

## create

The create method adds a new publishing environment in your stack.

```
"environment": {
           "name": "development",
           "urls": [{
               "locale": "en-us",
               "url": "http://example.com/"
           }]
       }
   }
import contentstack_management
client = contentstack_management.Client(authtoken='authtoken')
response = client.stack('api_key').environments().create(data).json()
```

Data required to create a new environment

## delete

The delete method removes an existing environment from a particular stack of your organization.

```
import contentstack_management
client = contentstack_management.Client(authtoken='authtoken')
response = client.stack('api_key').environments('environment_name').delete().json()
```

Name of the environment you want to delete

## fetch

The fetch method retrieves the details of a specific environment from the stack.

```
import contentstack_management
client = contentstack_management.Client(authtoken='authtoken')
response = client.stack('api_key').environments('environment_name').fetch().json()
```

Name of the environment you want to fetch

## find

The find method retrieves the details of all the environments in a particular stack.

```
import contentstack_management
client = contentstack_management.Client(authtoken='authtoken')
response = client.stack("api_key").environments().find().json()
```

## update

The update method allows you to make changes in the existing environment for a stack.

```
data = {
       "environment": {
           "name": "development",
           "urls": [{
               "locale": "en-us",
               "url": "http://example.com/"
           }]
       }
   }
import contentstack_management
client = contentstack_management.Client(authtoken='authtoken')
response = client.stack('api_key').environments("environment_name").update(data).json()
```

The updated information for the environment

## Environment | Python Management SDK | Contentstack

Environment lets you publish content to a destination URL, with support for multiple environments, in the Python Management SDK.