Skip to main content

A python wrapper for creating, managing and deploying sites to Netlify using the Netlify APIs.

Project description

netlify-py

A python client for creating, managing and deploying sites to Netlify using the Netlify API.

For more info refer their official documentation at Netlify docs.

Quick start

  1. Install netlify-py

    pip install netlify-py
    
  2. Create an instance by passing a personal access token

    from netlify_py import NetlifyPy
    n = NetlifyPy(access_token="zYR6c7fjFYdmxvMW03Vs1qYOIIImXT3sLGPf50hW2AE")
    
  3. Example usage

    # return all sites
    sites = n.sites.list_sites()
    
    # get a specific site
    site = n.sites.get_site("site_id")
    
    # create a new site
    new_site = n.sites.create_site()
    
    # list all deploys for a site
    deploys = n.deploys.list_site_deploys("site_id")
    
    # create a deploy of all files in a dir
    new_deploy = n.deploys.deploy_site("site_id","dir_to_deploy")
    
    # get a deploy
    deploy = n.deploys.get_deploy("deploy_id")
    

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

netlify_py-0.1.0.tar.gz (6.7 kB view hashes)

Uploaded Source

Built Distribution

netlify_py-0.1.0-py3-none-any.whl (7.7 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page