Client and library to interact with Netlify API.
Project description
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file pynetlify-0.1.1.tar.gz
.
File metadata
- Download URL: pynetlify-0.1.1.tar.gz
- Upload date:
- Size: 5.9 kB
- Tags: Source
- Uploaded using 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
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b68bad021c692ba84c64de3ee9a2c9d64e3b51a7a50e3d436ee8ff4a946ebe08 |
|
MD5 | 23c62e4a39ef3ff3196e01596329ea7c |
|
BLAKE2b-256 | aab89fab908aa68a432c5f5ed7e0222a767adb6beccc6d0527010c50ad50e698 |
File details
Details for the file pynetlify-0.1.1-py3-none-any.whl
.
File metadata
- Download URL: pynetlify-0.1.1-py3-none-any.whl
- Upload date:
- Size: 20.3 kB
- Tags: Python 3
- Uploaded using 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
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 707c2cb3fcf6a55502a4572ca69e972b08f41671e811daf0a228fe819972b8f8 |
|
MD5 | 79592d75095b2eb9c9fe350e86b3af61 |
|
BLAKE2b-256 | 8d1fe5935870f8a7efc5bf91a2bd91134d77694dc09d470f0d85237cf4414256 |