Skip to main content

Bare-bones python library for the official Netlify API

Project description

Netlify Python Client

GitHub release (latest by date) CI PyPI - Python Version PyPI - License

This is a work in progress package designed to wrap the Netlify APIs for python client users.

Note that this library is in pre-release and the APIs may be changed in later versions.

User Guide

This section is intended for developers who want to use the library to make requests to Netlify.

Installation

netlify-python currently supports python 3.10+.

Recommended installation through PIP via pypi.

$ pip install netlify-python

Usage

This client currently only supports Personal Access Tokens. Navigate to User Settings > Applications > Personal Access Tokens and create a new access token. This is the token you'll use in your initialization of the client.

This created a client that can send http requests.

from netlify import NetlifyClient

client = NetlifyClient(access_token="my-access-token")

client.get_current_user() # Get current user information
client.create_site_deploy('site-id', 'path/to/zip/file.zip')

API

⚠ This client is currently expanding its API support, more documentation coming soon here.

For Developers

This section is for developers who want to improve this library. The default development version is on 3.10.4 but we are currently supporting all python versions >= 3.10

Development Dependencies

Make sure that you have pyenv. You can test this by checking your python version after opening this directory.

$ python --version
Python 3.10.4

Make sure your active python version has virtualenv setup via:

$ python -m pip install virtualenv

Create and activate your venv

$ python -m venv venv
$ . venv/bin/activate

Starting development

Everything here out should be in the venv.

Install your dependencies:

$ pip install .[dev]

You should be good to go now.

Building the package

Get your build dependencies in place:

$ pip install .[build]

Then build the package:

$ python -m build

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_python-0.1.0.tar.gz (7.4 kB view details)

Uploaded Source

Built Distribution

netlify_python-0.1.0-py3-none-any.whl (9.5 kB view details)

Uploaded Python 3

File details

Details for the file netlify_python-0.1.0.tar.gz.

File metadata

  • Download URL: netlify_python-0.1.0.tar.gz
  • Upload date:
  • Size: 7.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.4

File hashes

Hashes for netlify_python-0.1.0.tar.gz
Algorithm Hash digest
SHA256 853d4e7b181d10f3188161d20f531b518a804991c57978ade61c74e220938df2
MD5 9c3a169e74889ae0b228a6bb32f3d011
BLAKE2b-256 a3c32b1b8fa242e513b4a2c52064e685c49b424d33780c9ddedf294cd8a011b3

See more details on using hashes here.

File details

Details for the file netlify_python-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for netlify_python-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c87ef0e9d0cf43d94ac7be971b4abed611b7182b0b5b18847699c5fd5123e71a
MD5 8d3d9463180423bc7176452a1b564f9f
BLAKE2b-256 6d5890e2afb176512fd0d4ac8084f81ae53a758c385e219b282172e8eb1c533d

See more details on using hashes here.

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