diff --git a/.gitignore b/.gitignore index 42fda467..cad019bd 100644 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,4 @@ libssh/compile_commands.json /.idea /tests/unit_test_cert_key-cert.pub /doc/_build +.pdm-python diff --git a/README.md b/README.md new file mode 100644 index 00000000..cfee736d --- /dev/null +++ b/README.md @@ -0,0 +1,63 @@ +--- +title: ssh-python +--- + +Bindings for [libssh](https://www.libssh.org) C library. + +[![License](https://img.shields.io/badge/License-LGPL%20v2-blue.svg)](https://pypi.python.org/pypi/ssh-python) + +[![Latest Version](https://img.shields.io/pypi/v/ssh-python.svg)](https://pypi.python.org/pypi/ssh-python) + +[![image](https://circleci.com/gh/ParallelSSH/ssh-python/tree/master.svg?style=shield)](https://circleci.com/gh/ParallelSSH/ssh-python/tree/master) + +[![image](https://img.shields.io/pypi/wheel/ssh-python.svg)](https://pypi.python.org/pypi/ssh-python) + +[![image](https://img.shields.io/pypi/pyversions/ssh-python.svg)](https://pypi.python.org/pypi/ssh-python) + +[![image](https://ci.appveyor.com/api/projects/status/2t4bmmtjvfy5s1in/branch/master?svg=true)](https://ci.appveyor.com/project/pkittenis/ssh-python) + +[![Latest documentation](https://readthedocs.org/projects/ssh-python/badge/?version=latest)](http://ssh-python.readthedocs.org/en/latest/) + +# Installation + +Binary wheels are provided for Linux (manylinux 2010), OSX (10.14 and +10.15 for brew Python), and Windows 64-bit (Python 3.6/3.7/3.8). + +Wheels have *no dependencies*. + +For building from source, see +[documentation](https://ssh-python.readthedocs.io/en/latest/installation.html#building-from-source). + +``` shell +pip install ssh-python +``` + +Pip may need to be updated to be able to install binary wheels. + +``` shell +pip install -U pip +pip install ssh-python +``` + +# Quick Start + +See [command execution +script](https://github.com/ParallelSSH/ssh-python/blob/master/examples/exec.py) +for complete example. + +# Features + +The library uses [Cython](https://www.cython.org) based native code +extensions as wrappers to `libssh`. + +- Thread safe - GIL released as much as possible + - libssh threading limitations apply - anything not supported in C + is not supported in Python +- Very low overhead thin wrapper +- Object oriented + - Memory freed automatically and safely as objects are garbage + collected by Python +- Uses Python semantics where applicable + - channel/file handle context manager support + - channel/file handle iterator support +- Raises low level C errors as Python exceptions diff --git a/pdm.lock b/pdm.lock new file mode 100644 index 00000000..6a446b33 --- /dev/null +++ b/pdm.lock @@ -0,0 +1,18 @@ +# This file is @generated by PDM. +# It is not intended for manual editing. + +[metadata] +groups = ["default"] +strategy = ["cross_platform"] +lock_version = "4.4" +content_hash = "sha256:3c4ce0efac29ab6a24f8648633aed2fe0e81221e62ebdb1a6ceed2cc74b7b45c" + +[[package]] +name = "setuptools" +version = "68.2.2" +requires_python = ">=3.8" +summary = "Easily download, build, install, upgrade, and uninstall Python packages" +files = [ + {file = "setuptools-68.2.2-py3-none-any.whl", hash = "sha256:b454a35605876da60632df1a60f736524eb73cc47bbc9f3f1ef1b644de74fd2a"}, + {file = "setuptools-68.2.2.tar.gz", hash = "sha256:4ac1475276d2f1c48684874089fefcd83bd7162ddaafb81fac866ba0db282a87"}, +] diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 00000000..79038813 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,41 @@ +[project] +name = "ssh-python" +version = "1.0.1" +description = "libssh C library bindings for Python." +authors = [ + {name = "Panos Kittenis", email = "22e889d8@opayq.com"}, +] +dependencies = [ + "setuptools>=68.2.2", +] +requires-python = ">=3.8" +readme = "README.md" +license = {text = "LGPLv2.1"} +classifiers = [ + "Development Status :: 4 - Beta", + "Intended Audience :: Developers", + "License :: OSI Approved :: GNU Lesser General Public License v2 (LGPLv2)", + "Operating System :: MacOS :: MacOS X", + "Operating System :: Microsoft :: Windows", + "Operating System :: OS Independent", + "Operating System :: POSIX", + "Operating System :: POSIX :: BSD", + "Operating System :: POSIX :: Linux", + "Programming Language :: C", + "Programming Language :: Python", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Topic :: Software Development :: Libraries", + "Topic :: Software Development :: Libraries :: Python Modules", + "Topic :: System :: Networking", + "Topic :: System :: Shells", +] + +[project.urls] +Homepage = "https://github.com/ParallelSSH/ssh-python" +[build-system] +requires = ["pdm-backend"] +build-backend = "pdm.backend" +