- »
- [Reference](https://pygithub.readthedocs.io/en/stable/reference.html) »
- [Github objects](https://pygithub.readthedocs.io/en/stable/github_objects.html) »
- EnvironmentProtectionRule
- [View page source](https://pygithub.readthedocs.io/en/stable/_sources/github_objects/EnvironmentProtectionRule.rst.txt)
* * *
# EnvironmentProtectionRule [¶](https://pygithub.readthedocs.io/en/stable/github_objects/EnvironmentProtectionRule.html\#environmentprotectionrule "Permalink to this headline")
_class_ `github.EnvironmentProtectionRule.` `EnvironmentProtectionRule` [¶](https://pygithub.readthedocs.io/en/stable/github_objects/EnvironmentProtectionRule.html#github.EnvironmentProtectionRule.EnvironmentProtectionRule "Permalink to this definition")
This class represents a protection rule for an environment.
The reference can be found here
[https://docs.github.com/en/rest/reference/deployments#environments](https://docs.github.com/en/rest/reference/deployments#environments)
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/AstroMined/pygithub-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server