Bare-bones python library for the official Netlify API
Project description
Netlify Python Client SDK
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]
Setup pre-commits:
$ pre-commit install
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
Built Distribution
File details
Details for the file netlify-python-0.3.0.tar.gz
.
File metadata
- Download URL: netlify-python-0.3.0.tar.gz
- Upload date:
- Size: 10.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 44566e289164a77e2c0a37e4e18381595fb0591c724b4f5f3b185ce7408adc9a |
|
MD5 | 6633865ff5fccb1a067c091dba45c109 |
|
BLAKE2b-256 | 3c412d3b2cd7ac6e5ec93a377ad6ae24508746872bb997b2efdd6aeebbd98090 |
File details
Details for the file netlify_python-0.3.0-py3-none-any.whl
.
File metadata
- Download URL: netlify_python-0.3.0-py3-none-any.whl
- Upload date:
- Size: 9.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d0f8d0d5fca62ebc087a2cda4d42d5017a0e1abf0069672adab84881ed2ddb87 |
|
MD5 | cce3a122b623711038f79c04af3df3fd |
|
BLAKE2b-256 | 4fbd4942f5f30cb0d7ee64f31ee5cdfc130c15d89a731efd345571bd1cdc288f |