spindlex 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (59) hide show
  1. spindlex-0.1.0/CHANGELOG.md +60 -0
  2. spindlex-0.1.0/LICENSE +21 -0
  3. spindlex-0.1.0/MANIFEST.in +31 -0
  4. spindlex-0.1.0/PKG-INFO +160 -0
  5. spindlex-0.1.0/README.md +98 -0
  6. spindlex-0.1.0/pyproject.toml +169 -0
  7. spindlex-0.1.0/setup.cfg +98 -0
  8. spindlex-0.1.0/spindlex/__init__.py +112 -0
  9. spindlex-0.1.0/spindlex/_version.py +12 -0
  10. spindlex-0.1.0/spindlex/auth/__init__.py +18 -0
  11. spindlex-0.1.0/spindlex/auth/gssapi.py +340 -0
  12. spindlex-0.1.0/spindlex/auth/keyboard_interactive.py +47 -0
  13. spindlex-0.1.0/spindlex/auth/password.py +43 -0
  14. spindlex-0.1.0/spindlex/auth/publickey.py +43 -0
  15. spindlex-0.1.0/spindlex/client/__init__.py +28 -0
  16. spindlex-0.1.0/spindlex/client/async_sftp_client.py +574 -0
  17. spindlex-0.1.0/spindlex/client/async_ssh_client.py +299 -0
  18. spindlex-0.1.0/spindlex/client/sftp_client.py +687 -0
  19. spindlex-0.1.0/spindlex/client/ssh_client.py +566 -0
  20. spindlex-0.1.0/spindlex/crypto/__init__.py +29 -0
  21. spindlex-0.1.0/spindlex/crypto/backend.py +291 -0
  22. spindlex-0.1.0/spindlex/crypto/ciphers.py +176 -0
  23. spindlex-0.1.0/spindlex/crypto/kex.py +374 -0
  24. spindlex-0.1.0/spindlex/crypto/pkey.py +802 -0
  25. spindlex-0.1.0/spindlex/exceptions.py +192 -0
  26. spindlex-0.1.0/spindlex/hostkeys/__init__.py +22 -0
  27. spindlex-0.1.0/spindlex/hostkeys/policy.py +143 -0
  28. spindlex-0.1.0/spindlex/hostkeys/storage.py +238 -0
  29. spindlex-0.1.0/spindlex/logging/__init__.py +41 -0
  30. spindlex-0.1.0/spindlex/logging/formatters.py +128 -0
  31. spindlex-0.1.0/spindlex/logging/handlers.py +119 -0
  32. spindlex-0.1.0/spindlex/logging/logger.py +218 -0
  33. spindlex-0.1.0/spindlex/logging/monitoring.py +399 -0
  34. spindlex-0.1.0/spindlex/logging/sanitizer.py +127 -0
  35. spindlex-0.1.0/spindlex/protocol/__init__.py +20 -0
  36. spindlex-0.1.0/spindlex/protocol/constants.py +298 -0
  37. spindlex-0.1.0/spindlex/protocol/messages.py +660 -0
  38. spindlex-0.1.0/spindlex/protocol/sftp_constants.py +180 -0
  39. spindlex-0.1.0/spindlex/protocol/sftp_messages.py +943 -0
  40. spindlex-0.1.0/spindlex/protocol/utils.py +348 -0
  41. spindlex-0.1.0/spindlex/py.typed +0 -0
  42. spindlex-0.1.0/spindlex/server/__init__.py +14 -0
  43. spindlex-0.1.0/spindlex/server/sftp_server.py +1261 -0
  44. spindlex-0.1.0/spindlex/server/ssh_server.py +804 -0
  45. spindlex-0.1.0/spindlex/tools/__init__.py +1 -0
  46. spindlex-0.1.0/spindlex/tools/benchmark.py +238 -0
  47. spindlex-0.1.0/spindlex/tools/keygen.py +130 -0
  48. spindlex-0.1.0/spindlex/transport/__init__.py +30 -0
  49. spindlex-0.1.0/spindlex/transport/async_channel.py +337 -0
  50. spindlex-0.1.0/spindlex/transport/async_transport.py +648 -0
  51. spindlex-0.1.0/spindlex/transport/channel.py +496 -0
  52. spindlex-0.1.0/spindlex/transport/forwarding.py +696 -0
  53. spindlex-0.1.0/spindlex/transport/kex.py +51 -0
  54. spindlex-0.1.0/spindlex/transport/transport.py +1478 -0
  55. spindlex-0.1.0/spindlex.egg-info/PKG-INFO +160 -0
  56. spindlex-0.1.0/spindlex.egg-info/SOURCES.txt +58 -0
  57. spindlex-0.1.0/spindlex.egg-info/dependency_links.txt +1 -0
  58. spindlex-0.1.0/spindlex.egg-info/requires.txt +37 -0
  59. spindlex-0.1.0/spindlex.egg-info/top_level.txt +1 -0
@@ -0,0 +1,60 @@
1
+ # Changelog
2
+
3
+ All notable changes to SpindleX will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## [Unreleased]
9
+
10
+ ### Added
11
+ - Comprehensive API documentation with Sphinx
12
+ - Advanced usage examples and tutorials
13
+ - Performance optimization guide
14
+ - Security best practices documentation
15
+ - Async SSH client implementation
16
+ - Custom protocol subsystem support
17
+ - High-performance file transfer optimizations
18
+ - Connection pooling and management
19
+ - Built-in performance monitoring
20
+ - Extensive logging and debugging capabilities
21
+
22
+ ### Changed
23
+ - Improved error handling and exception hierarchy
24
+ - Enhanced SFTP client with advanced features
25
+ - Optimized cryptographic operations
26
+ - Better memory management for large transfers
27
+
28
+ ### Fixed
29
+ - Various bug fixes and stability improvements
30
+ - Memory leaks in long-running connections
31
+ - Race conditions in concurrent operations
32
+
33
+ ### Security
34
+ - Enhanced host key verification
35
+ - Improved authentication security
36
+ - Secure random number generation
37
+ - Constant-time cryptographic comparisons
38
+
39
+ ## [0.1.0] - 2024-01-15
40
+
41
+ ### Added
42
+ - Initial release of SpindleX
43
+ - Complete SSHv2 protocol implementation
44
+ - SSH client with all major authentication methods
45
+ - SFTP client for secure file transfers
46
+ - SSH server implementation
47
+ - SFTP server implementation
48
+ - Modern cryptographic algorithms (Ed25519, ChaCha20-Poly1305)
49
+ - Comprehensive test suite
50
+ - Documentation and examples
51
+
52
+ ### Features
53
+ - **SSH Client**: Password, public key, keyboard-interactive, GSSAPI authentication
54
+ - **SFTP Client**: File upload/download, directory operations, attribute management
55
+ - **SSH Server**: Custom server implementation with authentication hooks
56
+ - **SFTP Server**: File system operations with access control
57
+ - **Port Forwarding**: Local and remote port forwarding
58
+ - **Cryptography**: Ed25519, ECDSA, RSA keys; ChaCha20-Poly1305, AES-GCM ciphers
59
+ - **Security**: Host key verification, secure defaults, audit logging
60
+ - **Performance**: Optimized for high throughput and low latency
spindlex-0.1.0/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024 SpindleX Team
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,31 @@
1
+ # Include the README and license files
2
+ include README.md
3
+ include LICENSE
4
+ include CHANGELOG.md
5
+
6
+ # Include the typed marker
7
+ include ssh_library/py.typed
8
+
9
+ # Include version file
10
+ include ssh_library/_version.py
11
+
12
+ # Include all Python files
13
+ recursive-include ssh_library *.py
14
+
15
+ # Exclude test files from distribution
16
+ recursive-exclude tests *
17
+ recursive-exclude * __pycache__
18
+ recursive-exclude * *.py[co]
19
+
20
+ # Exclude development files
21
+ exclude .gitignore
22
+ exclude .pre-commit-config.yaml
23
+ exclude pyproject.toml.bak
24
+ exclude tox.ini
25
+ exclude .coverage
26
+ exclude .pytest_cache
27
+
28
+ # Exclude build artifacts
29
+ global-exclude *.so
30
+ global-exclude *.dylib
31
+ global-exclude *.dll
@@ -0,0 +1,160 @@
1
+ Metadata-Version: 2.4
2
+ Name: spindlex
3
+ Version: 0.1.0
4
+ Summary: A pure-Python SSHv2 client/server library
5
+ Home-page: https://github.com/spindle-dev/spindle
6
+ Author: Spindle Team
7
+ Author-email: SpindleX Team <team@spindlex.org>
8
+ Maintainer-email: SpindleX Team <team@spindlex.org>
9
+ License: MIT
10
+ Project-URL: Homepage, https://gitlab.com/daveops.world/development/python/spindlex
11
+ Project-URL: Documentation, https://spindlex.readthedocs.io/
12
+ Project-URL: Repository, https://gitlab.com/daveops.world/development/python/spindlex.git
13
+ Project-URL: Issues, https://gitlab.com/daveops.world/development/python/spindlex/-/issues
14
+ Project-URL: Changelog, https://gitlab.com/daveops.world/development/python/spindlex/-/blob/main/CHANGELOG.md
15
+ Keywords: ssh,sftp,client,server,cryptography,security
16
+ Classifier: Development Status :: 4 - Beta
17
+ Classifier: Intended Audience :: Developers
18
+ Classifier: License :: OSI Approved :: MIT License
19
+ Classifier: Operating System :: OS Independent
20
+ Classifier: Programming Language :: Python :: 3
21
+ Classifier: Programming Language :: Python :: 3.8
22
+ Classifier: Programming Language :: Python :: 3.9
23
+ Classifier: Programming Language :: Python :: 3.10
24
+ Classifier: Programming Language :: Python :: 3.11
25
+ Classifier: Programming Language :: Python :: 3.12
26
+ Classifier: Topic :: Internet
27
+ Classifier: Topic :: Security :: Cryptography
28
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
29
+ Classifier: Topic :: System :: Networking
30
+ Requires-Python: >=3.8
31
+ Description-Content-Type: text/markdown
32
+ License-File: LICENSE
33
+ Requires-Dist: cryptography>=3.0
34
+ Requires-Dist: typing-extensions>=4.0; python_version < "3.10"
35
+ Provides-Extra: async
36
+ Requires-Dist: asyncio-dgram>=2.0; extra == "async"
37
+ Provides-Extra: gssapi
38
+ Requires-Dist: gssapi>=1.6.0; sys_platform != "win32" and extra == "gssapi"
39
+ Provides-Extra: dev
40
+ Requires-Dist: black>=22.0; extra == "dev"
41
+ Requires-Dist: isort>=5.0; extra == "dev"
42
+ Requires-Dist: flake8>=4.0; extra == "dev"
43
+ Requires-Dist: mypy>=0.900; extra == "dev"
44
+ Requires-Dist: pre-commit>=2.15; extra == "dev"
45
+ Requires-Dist: pytest>=6.0; extra == "dev"
46
+ Requires-Dist: pytest-cov>=3.0; extra == "dev"
47
+ Requires-Dist: pytest-asyncio>=0.18; extra == "dev"
48
+ Requires-Dist: pytest-xdist>=2.0; extra == "dev"
49
+ Provides-Extra: docs
50
+ Requires-Dist: sphinx>=5.0; extra == "docs"
51
+ Requires-Dist: sphinx-rtd-theme>=1.0; extra == "docs"
52
+ Requires-Dist: myst-parser>=0.18; extra == "docs"
53
+ Requires-Dist: sphinx-autobuild>=2021.3.14; extra == "docs"
54
+ Requires-Dist: sphinxcontrib-spelling>=7.6; extra == "docs"
55
+ Provides-Extra: test
56
+ Requires-Dist: pytest>=6.0; extra == "test"
57
+ Requires-Dist: pytest-cov>=3.0; extra == "test"
58
+ Requires-Dist: pytest-asyncio>=0.18; extra == "test"
59
+ Requires-Dist: pytest-xdist>=2.0; extra == "test"
60
+ Requires-Dist: coverage>=6.0; extra == "test"
61
+ Dynamic: license-file
62
+
63
+ # SpindleX
64
+
65
+ A pure-Python SSHv2 client/server library that provides secure, high-performance SSH and SFTP operations without GPL/LGPL dependencies.
66
+
67
+ ## Features
68
+
69
+ - **Pure Python**: No C extensions or system dependencies
70
+ - **Modern Security**: Ed25519, ECDSA, ChaCha20-Poly1305, and other modern algorithms
71
+ - **Full SSH Support**: Client and server implementations with all major features
72
+ - **SFTP Support**: Complete SFTP client and server functionality
73
+ - **Async Support**: Optional asyncio support for high-performance applications
74
+ - **Comprehensive**: Port forwarding, authentication methods, host key policies
75
+ - **Well-Tested**: Extensive test suite with high code coverage
76
+ - **Type Hints**: Fully typed codebase for better development experience
77
+
78
+ ## Quick Start
79
+
80
+ ### Installation
81
+
82
+ ```bash
83
+ pip install spindlex
84
+ ```
85
+
86
+ ### Basic Usage
87
+
88
+ ```python
89
+ from spindlex import SSHClient
90
+
91
+ # Create client and connect
92
+ client = SSHClient()
93
+ client.connect('example.com', username='user', password='password')
94
+
95
+ # Execute a command
96
+ stdin, stdout, stderr = client.exec_command('ls -la')
97
+ print(stdout.read().decode())
98
+
99
+ # Use SFTP
100
+ sftp = client.open_sftp()
101
+ sftp.get('/remote/file.txt', '/local/file.txt')
102
+ sftp.close()
103
+
104
+ # Clean up
105
+ client.close()
106
+ ```
107
+
108
+ ### Key-based Authentication
109
+
110
+ ```python
111
+ from spindlex import SSHClient
112
+ from spindlex.crypto.pkey import Ed25519Key
113
+
114
+ # Load private key
115
+ private_key = Ed25519Key.from_private_key_file('/path/to/private_key')
116
+
117
+ client = SSHClient()
118
+ client.connect(
119
+ hostname='example.com',
120
+ username='user',
121
+ pkey=private_key
122
+ )
123
+ ```
124
+
125
+ ## Documentation
126
+
127
+ - [Quick Start Guide](https://spindlex.readthedocs.io/en/latest/quickstart.html)
128
+ - [User Guide](https://spindlex.readthedocs.io/en/latest/user_guide/)
129
+ - [API Reference](https://spindlex.readthedocs.io/en/latest/api_reference/)
130
+ - [Examples](https://spindlex.readthedocs.io/en/latest/examples/)
131
+ - [Security Guide](https://spindlex.readthedocs.io/en/latest/security.html)
132
+
133
+ ## Requirements
134
+
135
+ - Python 3.8+
136
+ - cryptography >= 3.0
137
+
138
+ ## Optional Dependencies
139
+
140
+ - `asyncio` support: `pip install spindlex[async]`
141
+ - Development tools: `pip install spindlex[dev]`
142
+ - GSSAPI authentication: `pip install spindlex[gssapi]` (Unix only)
143
+
144
+ ## Contributing
145
+
146
+ We welcome contributions! Please see our [Contributing Guide](https://spindlex.readthedocs.io/en/latest/contributing.html) for details.
147
+
148
+ ## Security
149
+
150
+ For security issues, please email security@spindlex.org instead of creating a public issue.
151
+
152
+ ## License
153
+
154
+ This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
155
+
156
+ ## Acknowledgments
157
+
158
+ - Built with modern Python cryptography
159
+ - Inspired by the need for a pure-Python SSH library
160
+ - Thanks to all contributors and the Python community
@@ -0,0 +1,98 @@
1
+ # SpindleX
2
+
3
+ A pure-Python SSHv2 client/server library that provides secure, high-performance SSH and SFTP operations without GPL/LGPL dependencies.
4
+
5
+ ## Features
6
+
7
+ - **Pure Python**: No C extensions or system dependencies
8
+ - **Modern Security**: Ed25519, ECDSA, ChaCha20-Poly1305, and other modern algorithms
9
+ - **Full SSH Support**: Client and server implementations with all major features
10
+ - **SFTP Support**: Complete SFTP client and server functionality
11
+ - **Async Support**: Optional asyncio support for high-performance applications
12
+ - **Comprehensive**: Port forwarding, authentication methods, host key policies
13
+ - **Well-Tested**: Extensive test suite with high code coverage
14
+ - **Type Hints**: Fully typed codebase for better development experience
15
+
16
+ ## Quick Start
17
+
18
+ ### Installation
19
+
20
+ ```bash
21
+ pip install spindlex
22
+ ```
23
+
24
+ ### Basic Usage
25
+
26
+ ```python
27
+ from spindlex import SSHClient
28
+
29
+ # Create client and connect
30
+ client = SSHClient()
31
+ client.connect('example.com', username='user', password='password')
32
+
33
+ # Execute a command
34
+ stdin, stdout, stderr = client.exec_command('ls -la')
35
+ print(stdout.read().decode())
36
+
37
+ # Use SFTP
38
+ sftp = client.open_sftp()
39
+ sftp.get('/remote/file.txt', '/local/file.txt')
40
+ sftp.close()
41
+
42
+ # Clean up
43
+ client.close()
44
+ ```
45
+
46
+ ### Key-based Authentication
47
+
48
+ ```python
49
+ from spindlex import SSHClient
50
+ from spindlex.crypto.pkey import Ed25519Key
51
+
52
+ # Load private key
53
+ private_key = Ed25519Key.from_private_key_file('/path/to/private_key')
54
+
55
+ client = SSHClient()
56
+ client.connect(
57
+ hostname='example.com',
58
+ username='user',
59
+ pkey=private_key
60
+ )
61
+ ```
62
+
63
+ ## Documentation
64
+
65
+ - [Quick Start Guide](https://spindlex.readthedocs.io/en/latest/quickstart.html)
66
+ - [User Guide](https://spindlex.readthedocs.io/en/latest/user_guide/)
67
+ - [API Reference](https://spindlex.readthedocs.io/en/latest/api_reference/)
68
+ - [Examples](https://spindlex.readthedocs.io/en/latest/examples/)
69
+ - [Security Guide](https://spindlex.readthedocs.io/en/latest/security.html)
70
+
71
+ ## Requirements
72
+
73
+ - Python 3.8+
74
+ - cryptography >= 3.0
75
+
76
+ ## Optional Dependencies
77
+
78
+ - `asyncio` support: `pip install spindlex[async]`
79
+ - Development tools: `pip install spindlex[dev]`
80
+ - GSSAPI authentication: `pip install spindlex[gssapi]` (Unix only)
81
+
82
+ ## Contributing
83
+
84
+ We welcome contributions! Please see our [Contributing Guide](https://spindlex.readthedocs.io/en/latest/contributing.html) for details.
85
+
86
+ ## Security
87
+
88
+ For security issues, please email security@spindlex.org instead of creating a public issue.
89
+
90
+ ## License
91
+
92
+ This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
93
+
94
+ ## Acknowledgments
95
+
96
+ - Built with modern Python cryptography
97
+ - Inspired by the need for a pure-Python SSH library
98
+ - Thanks to all contributors and the Python community
@@ -0,0 +1,169 @@
1
+ [build-system]
2
+ requires = ["setuptools>=61.0", "wheel"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "spindlex"
7
+ version = "0.1.0"
8
+ description = "A pure-Python SSHv2 client/server library"
9
+ readme = "README.md"
10
+ license = {text = "MIT"}
11
+ authors = [
12
+ {name = "SpindleX Team", email = "team@spindlex.org"}
13
+ ]
14
+ maintainers = [
15
+ {name = "SpindleX Team", email = "team@spindlex.org"}
16
+ ]
17
+ keywords = ["ssh", "sftp", "client", "server", "cryptography", "security"]
18
+ classifiers = [
19
+ "Development Status :: 4 - Beta",
20
+ "Intended Audience :: Developers",
21
+ "License :: OSI Approved :: MIT License",
22
+ "Operating System :: OS Independent",
23
+ "Programming Language :: Python :: 3",
24
+ "Programming Language :: Python :: 3.8",
25
+ "Programming Language :: Python :: 3.9",
26
+ "Programming Language :: Python :: 3.10",
27
+ "Programming Language :: Python :: 3.11",
28
+ "Programming Language :: Python :: 3.12",
29
+ "Topic :: Internet",
30
+ "Topic :: Security :: Cryptography",
31
+ "Topic :: Software Development :: Libraries :: Python Modules",
32
+ "Topic :: System :: Networking",
33
+ ]
34
+ requires-python = ">=3.8"
35
+ dependencies = [
36
+ "cryptography>=3.0",
37
+ "typing-extensions>=4.0; python_version<'3.10'",
38
+ ]
39
+
40
+ [project.optional-dependencies]
41
+ async = [
42
+ "asyncio-dgram>=2.0",
43
+ ]
44
+ gssapi = [
45
+ "gssapi>=1.6.0; sys_platform!='win32'",
46
+ ]
47
+ dev = [
48
+ "black>=22.0",
49
+ "isort>=5.0",
50
+ "flake8>=4.0",
51
+ "mypy>=0.900",
52
+ "pre-commit>=2.15",
53
+ "pytest>=6.0",
54
+ "pytest-cov>=3.0",
55
+ "pytest-asyncio>=0.18",
56
+ "pytest-xdist>=2.0",
57
+ ]
58
+ docs = [
59
+ "sphinx>=5.0",
60
+ "sphinx-rtd-theme>=1.0",
61
+ "myst-parser>=0.18",
62
+ "sphinx-autobuild>=2021.3.14",
63
+ "sphinxcontrib-spelling>=7.6",
64
+ ]
65
+ test = [
66
+ "pytest>=6.0",
67
+ "pytest-cov>=3.0",
68
+ "pytest-asyncio>=0.18",
69
+ "pytest-xdist>=2.0",
70
+ "coverage>=6.0",
71
+ ]
72
+
73
+ [project.urls]
74
+ Homepage = "https://gitlab.com/daveops.world/development/python/spindlex"
75
+ Documentation = "https://spindlex.readthedocs.io/"
76
+ Repository = "https://gitlab.com/daveops.world/development/python/spindlex.git"
77
+ Issues = "https://gitlab.com/daveops.world/development/python/spindlex/-/issues"
78
+ Changelog = "https://gitlab.com/daveops.world/development/python/spindlex/-/blob/main/CHANGELOG.md"
79
+
80
+ [tool.setuptools.packages.find]
81
+ where = ["."]
82
+ include = ["spindlex*"]
83
+ exclude = ["tests*", "docs*"]
84
+
85
+ [tool.setuptools.package-data]
86
+ spindlex = ["py.typed"]
87
+
88
+ [tool.black]
89
+ line-length = 88
90
+ target-version = ['py38']
91
+ include = '\.pyi?$'
92
+ extend-exclude = '''
93
+ /(
94
+ # directories
95
+ \.eggs
96
+ | \.git
97
+ | \.hg
98
+ | \.mypy_cache
99
+ | \.tox
100
+ | \.venv
101
+ | build
102
+ | dist
103
+ )/
104
+ '''
105
+
106
+ [tool.isort]
107
+ profile = "black"
108
+ multi_line_output = 3
109
+ line_length = 88
110
+ known_first_party = ["spindlex"]
111
+
112
+ [tool.mypy]
113
+ python_version = "3.8"
114
+ warn_return_any = true
115
+ warn_unused_configs = true
116
+ disallow_untyped_defs = true
117
+ disallow_incomplete_defs = true
118
+ check_untyped_defs = true
119
+ disallow_untyped_decorators = true
120
+ no_implicit_optional = true
121
+ warn_redundant_casts = true
122
+ warn_unused_ignores = true
123
+ warn_no_return = true
124
+ warn_unreachable = true
125
+ strict_equality = true
126
+
127
+ [[tool.mypy.overrides]]
128
+ module = "tests.*"
129
+ disallow_untyped_defs = false
130
+
131
+ [tool.pytest.ini_options]
132
+ testpaths = ["tests"]
133
+ python_files = ["test_*.py"]
134
+ python_classes = ["Test*"]
135
+ python_functions = ["test_*"]
136
+ addopts = [
137
+ "--strict-markers",
138
+ "--strict-config",
139
+ "--tb=short",
140
+ ]
141
+ markers = [
142
+ "unit: Unit tests",
143
+ "integration: Integration tests requiring external services",
144
+ "performance: Performance and benchmark tests",
145
+ "security: Security-focused tests",
146
+ "slow: Tests that take a long time to run",
147
+ ]
148
+
149
+ [tool.coverage.run]
150
+ source = ["spindlex"]
151
+ omit = [
152
+ "*/tests/*",
153
+ "*/test_*",
154
+ "setup.py",
155
+ ]
156
+
157
+ [tool.coverage.report]
158
+ exclude_lines = [
159
+ "pragma: no cover",
160
+ "def __repr__",
161
+ "if self.debug:",
162
+ "if settings.DEBUG",
163
+ "raise AssertionError",
164
+ "raise NotImplementedError",
165
+ "if 0:",
166
+ "if __name__ == .__main__.:",
167
+ "class .*\\bProtocol\\):",
168
+ "@(abc\\.)?abstractmethod",
169
+ ]
@@ -0,0 +1,98 @@
1
+ [metadata]
2
+ name = spindle
3
+ description = Spindle - A pure-Python SSHv2 client/server library with modern security
4
+ long_description = file: README.md
5
+ long_description_content_type = text/markdown
6
+ url = https://github.com/spindle-dev/spindle
7
+ author = Spindle Team
8
+ author_email = team@spindle.dev
9
+ license = Apache-2.0
10
+ license_files = LICENSE
11
+ classifiers =
12
+ Development Status :: 4 - Beta
13
+ Intended Audience :: Developers
14
+ Intended Audience :: System Administrators
15
+ License :: OSI Approved :: Apache Software License
16
+ Operating System :: OS Independent
17
+ Programming Language :: Python :: 3
18
+ Programming Language :: Python :: 3.8
19
+ Programming Language :: Python :: 3.9
20
+ Programming Language :: Python :: 3.10
21
+ Programming Language :: Python :: 3.11
22
+ Programming Language :: Python :: 3.12
23
+ Programming Language :: Python :: 3 :: Only
24
+ Topic :: Internet
25
+ Topic :: Security :: Cryptography
26
+ Topic :: Software Development :: Libraries :: Python Modules
27
+ Topic :: System :: Networking
28
+ Typing :: Typed
29
+
30
+ [options]
31
+ packages = find:
32
+ python_requires = >=3.8
33
+ install_requires =
34
+ cryptography>=41.0.0
35
+ typing-extensions>=4.0.0; python_version<"3.10"
36
+
37
+ [options.packages.find]
38
+ include = ssh_library*
39
+
40
+ [options.extras_require]
41
+ dev =
42
+ pytest>=7.0.0
43
+ pytest-cov>=4.0.0
44
+ pytest-asyncio>=0.21.0
45
+ black>=23.0.0
46
+ isort>=5.12.0
47
+ mypy>=1.0.0
48
+ flake8>=6.0.0
49
+ pre-commit>=3.0.0
50
+ docs =
51
+ sphinx>=6.0.0
52
+ sphinx-rtd-theme>=1.2.0
53
+ myst-parser>=1.0.0
54
+ gssapi =
55
+ gssapi>=1.8.0; sys_platform!="win32"
56
+ async =
57
+ asyncio-dgram>=2.1.0
58
+
59
+ [options.entry_points]
60
+ console_scripts =
61
+ spindle-keygen = ssh_library.tools.keygen:main
62
+ spindle-benchmark = ssh_library.tools.benchmark:main
63
+
64
+ [flake8]
65
+ max-line-length = 88
66
+ extend-ignore = E203, W503
67
+ exclude =
68
+ .git,
69
+ __pycache__,
70
+ build,
71
+ dist,
72
+ .eggs,
73
+ *.egg-info,
74
+ .venv,
75
+ .tox
76
+
77
+ [mypy]
78
+ python_version = 3.8
79
+ warn_return_any = True
80
+ warn_unused_configs = True
81
+ disallow_untyped_defs = True
82
+ disallow_incomplete_defs = True
83
+ check_untyped_defs = True
84
+ disallow_untyped_decorators = True
85
+ no_implicit_optional = True
86
+ warn_redundant_casts = True
87
+ warn_unused_ignores = True
88
+ warn_no_return = True
89
+ warn_unreachable = True
90
+ strict_equality = True
91
+
92
+ [mypy-tests.*]
93
+ disallow_untyped_defs = False
94
+
95
+ [egg_info]
96
+ tag_build =
97
+ tag_date = 0
98
+