Name | netlify-python JSON |
Version |
0.3.1
JSON |
| download |
home_page | |
Summary | Bare-bones python library for the official Netlify API |
upload_time | 2024-01-28 01:24:35 |
maintainer | |
docs_url | None |
author | |
requires_python | >=3.10 |
license | MIT |
keywords |
http
netlify
client-library
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# Netlify Python Client SDK
![GitHub release (latest by date)](https://img.shields.io/github/v/release/cbrews/netlify-python?label=netlify-python)
[![CI](https://github.com/cbrews/netlify-python/actions/workflows/ci.yml/badge.svg)](https://github.com/cbrews/netlify-python/actions/workflows/ci.yml)
![PyPI - Python Version](https://img.shields.io/pypi/pyversions/netlify-python)
![PyPI - License](https://img.shields.io/pypi/l/netlify-python)
This is a work in progress package designed to wrap the [Netlify APIs](https://docs.netlify.com/api/get-started/) 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](https://pypi.org/project/netlify-python/) via pypi.
```shell
$ pip install netlify-python
```
### Usage
This client currently only supports [Personal Access Tokens](https://app.netlify.com/user/applications#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.
```python
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`](https://github.com/pyenv/pyenv). You can test this by checking your python version after opening this directory.
```bash
$ python --version
Python 3.10.4
```
Make sure your active python version has `virtualenv` setup via:
```bash
$ python -m pip install virtualenv
```
Create and activate your venv
```bash
$ python -m venv venv
$ . venv/bin/activate
```
### Starting development
Everything here out should be in the venv.
Install your dependencies:
```bash
$ pip install .[dev]
```
Setup pre-commits:
```bash
$ pre-commit install
```
You should be good to go now.
### Building the package
Get your build dependencies in place:
```bash
$ pip install .[build]
```
Then build the package:
```bash
$ python -m build
```
Raw data
{
"_id": null,
"home_page": "",
"name": "netlify-python",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.10",
"maintainer_email": "",
"keywords": "http,netlify,client-library",
"author": "",
"author_email": "Chris Brousseau <cbrews@users.noreply.github.com>",
"download_url": "https://files.pythonhosted.org/packages/af/c2/898ffd519740a3bab9f2696abf0abe1b81416165664ed7bfd432c99fca03/netlify-python-0.3.1.tar.gz",
"platform": null,
"description": "# Netlify Python Client SDK\n\n![GitHub release (latest by date)](https://img.shields.io/github/v/release/cbrews/netlify-python?label=netlify-python)\n[![CI](https://github.com/cbrews/netlify-python/actions/workflows/ci.yml/badge.svg)](https://github.com/cbrews/netlify-python/actions/workflows/ci.yml)\n![PyPI - Python Version](https://img.shields.io/pypi/pyversions/netlify-python)\n![PyPI - License](https://img.shields.io/pypi/l/netlify-python)\n\nThis is a work in progress package designed to wrap the [Netlify APIs](https://docs.netlify.com/api/get-started/) for python client users.\n\nNote that this library is in pre-release and the APIs may be changed in later versions.\n\n## User Guide\n\nThis section is intended for developers who want to use the library to make requests to Netlify.\n\n### Installation\n\n\u26a0 `netlify-python` currently supports python 3.10+.\n\nRecommended installation through [PIP](https://pypi.org/project/netlify-python/) via pypi.\n\n```shell\n$ pip install netlify-python\n```\n\n### Usage\n\nThis client currently only supports [Personal Access Tokens](https://app.netlify.com/user/applications#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.\n\nThis created a client that can send http requests.\n\n```python\nfrom netlify import NetlifyClient\n\nclient = NetlifyClient(access_token=\"my-access-token\")\n\nclient.get_current_user() # Get current user information\nclient.create_site_deploy('site-id', 'path/to/zip/file.zip')\n```\n\n### API\n\n\u26a0 This client is currently expanding its API support, more documentation coming soon here.\n\n## For Developers\n\nThis 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\n\n### Development Dependencies\n\nMake sure that you have [`pyenv`](https://github.com/pyenv/pyenv). You can test this by checking your python version after opening this directory.\n\n```bash\n$ python --version\nPython 3.10.4\n```\n\nMake sure your active python version has `virtualenv` setup via:\n\n```bash\n$ python -m pip install virtualenv\n```\n\nCreate and activate your venv\n```bash\n$ python -m venv venv\n$ . venv/bin/activate\n```\n\n### Starting development\n\nEverything here out should be in the venv.\n\nInstall your dependencies:\n```bash\n$ pip install .[dev]\n```\n\nSetup pre-commits:\n```bash\n$ pre-commit install\n```\n\nYou should be good to go now.\n\n### Building the package\nGet your build dependencies in place:\n\n```bash\n$ pip install .[build]\n```\n\nThen build the package:\n```bash\n$ python -m build\n```\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Bare-bones python library for the official Netlify API",
"version": "0.3.1",
"project_urls": null,
"split_keywords": [
"http",
"netlify",
"client-library"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "e8231c6b5cca3165ad757cd776afb3acc71f4b4da7849811212f8e04beba46ab",
"md5": "b1253979898caf44f3727ffbac0ddc3b",
"sha256": "38d6889ca6938304a9b72fa1265bf4ef97862c86f34c26da11dd7d312af7c601"
},
"downloads": -1,
"filename": "netlify_python-0.3.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "b1253979898caf44f3727ffbac0ddc3b",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.10",
"size": 9212,
"upload_time": "2024-01-28T01:24:34",
"upload_time_iso_8601": "2024-01-28T01:24:34.297339Z",
"url": "https://files.pythonhosted.org/packages/e8/23/1c6b5cca3165ad757cd776afb3acc71f4b4da7849811212f8e04beba46ab/netlify_python-0.3.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "afc2898ffd519740a3bab9f2696abf0abe1b81416165664ed7bfd432c99fca03",
"md5": "0c7720157433d7ca559ac022e43a2e02",
"sha256": "531ba7239bf78aafd7212c030dee29fca56f57c118bd8c8cbb389ab2762716cd"
},
"downloads": -1,
"filename": "netlify-python-0.3.1.tar.gz",
"has_sig": false,
"md5_digest": "0c7720157433d7ca559ac022e43a2e02",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.10",
"size": 10882,
"upload_time": "2024-01-28T01:24:35",
"upload_time_iso_8601": "2024-01-28T01:24:35.868296Z",
"url": "https://files.pythonhosted.org/packages/af/c2/898ffd519740a3bab9f2696abf0abe1b81416165664ed7bfd432c99fca03/netlify-python-0.3.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-01-28 01:24:35",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "netlify-python"
}