Skip to main content

Python library and simple command line client to interact with Netlify REST API. Tested with Python versions 2.7, 3.5, 3.6, 3.7.

Requires Netlify account with an active authentication token. Visit https://www.netlify.com/docs/cli/#authentication for more information.

Install

PyNetlify is available to install from PyPI:

pip install pynetlify

Use as a command line client

Configure by setting your personal Netlify authentication token to pynetlify.ini file at current working directory. Example pynetlify.ini:

[netlify]
auth-token = <personal-authentication-token>

Create a new site

python -m pynetlify create_site

Deploy folder to a site

python -m pynetlify deploy_folder --site-id <site-id> <folder-to-deploy>

List sites

python -m pynetlify list_sites

Delete site

python -m pynetlify delete_site <site-id>

Print command line help

python -m pynetlify --help

Print help for specific subcommand

python -m pynetlify <subcommand> --help

Use as a Python library

Import and create APIRequest object.

from pynetlify import pynetlify
api_request = pynetlify.APIRequest('auth_token')

Create site.

newly_created_site = api_request.create_site({'name': 'newly-created-site'})

See pynetlify.py source for more.

Release files for pynetlify 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pynetlify 0.1.1
File Size Uploaded
pynetlify-0.1.1.tar.gz 5.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pynetlify 0.1.1
File Interpreter ABI Platform
pynetlify-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 26.2 kB

Release files / pynetlify-0.1.1.tar.gz

Download URL pynetlify-0.1.1.tar.gz
Size 5.9 kB
Tags Source
SHA-256 checksum
How to use checksums
b68bad021c692ba84c64de3ee9a2c9d64e3b51a7a50e3d436ee8ff4a946ebe08
BLAKE2b-256 checksum
How to use checksums
aab89fab908aa68a432c5f5ed7e0222a767adb6beccc6d0527010c50ad50e698
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.15.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/39.0.1 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.6.8

Release files / pynetlify-0.1.1-py3-none-any.whl

Download URL pynetlify-0.1.1-py3-none-any.whl
Size 20.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
707c2cb3fcf6a55502a4572ca69e972b08f41671e811daf0a228fe819972b8f8
BLAKE2b-256 checksum
How to use checksums
8d1fe5935870f8a7efc5bf91a2bd91134d77694dc09d470f0d85237cf4414256
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.15.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/39.0.1 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.6.8

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page