snmpkit 1.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 (128) hide show
  1. snmpkit-1.1.0/.github/ISSUE_TEMPLATE/bug_report.yml +63 -0
  2. snmpkit-1.1.0/.github/ISSUE_TEMPLATE/feature_request.yml +36 -0
  3. snmpkit-1.1.0/.github/workflows/ci.yml +86 -0
  4. snmpkit-1.1.0/.github/workflows/release.yml +134 -0
  5. snmpkit-1.1.0/.gitignore +26 -0
  6. snmpkit-1.1.0/.python-version +1 -0
  7. snmpkit-1.1.0/CHANGELOG.md +100 -0
  8. snmpkit-1.1.0/CONTRIBUTING.md +95 -0
  9. snmpkit-1.1.0/Cargo.lock +231 -0
  10. snmpkit-1.1.0/Cargo.toml +19 -0
  11. snmpkit-1.1.0/Kylefile +125 -0
  12. snmpkit-1.1.0/LICENSE +235 -0
  13. snmpkit-1.1.0/PKG-INFO +99 -0
  14. snmpkit-1.1.0/README.md +67 -0
  15. snmpkit-1.1.0/benchmarks/__init__.py +1 -0
  16. snmpkit-1.1.0/benchmarks/bench_ber.py +108 -0
  17. snmpkit-1.1.0/benchmarks/bench_get.py +107 -0
  18. snmpkit-1.1.0/benchmarks/bench_pyagentx3.py +74 -0
  19. snmpkit-1.1.0/benchmarks/bench_snmpkit.py +87 -0
  20. snmpkit-1.1.0/benchmarks/bench_walk.py +121 -0
  21. snmpkit-1.1.0/benchmarks/results.json +55 -0
  22. snmpkit-1.1.0/benchmarks/run_all.py +99 -0
  23. snmpkit-1.1.0/docs/.gitignore +40 -0
  24. snmpkit-1.1.0/docs/app/docs/_meta.ts +18 -0
  25. snmpkit-1.1.0/docs/app/docs/agent/_meta.ts +10 -0
  26. snmpkit-1.1.0/docs/app/docs/agent/advanced/page.mdx +242 -0
  27. snmpkit-1.1.0/docs/app/docs/agent/examples/page.mdx +490 -0
  28. snmpkit-1.1.0/docs/app/docs/agent/page.mdx +123 -0
  29. snmpkit-1.1.0/docs/app/docs/agent/performance/page.mdx +119 -0
  30. snmpkit-1.1.0/docs/app/docs/agent/quickstart/page.mdx +157 -0
  31. snmpkit-1.1.0/docs/app/docs/agent/set-handler/page.mdx +229 -0
  32. snmpkit-1.1.0/docs/app/docs/agent/traps/page.mdx +206 -0
  33. snmpkit-1.1.0/docs/app/docs/agent/updater/page.mdx +245 -0
  34. snmpkit-1.1.0/docs/app/docs/changelog/page.mdx +89 -0
  35. snmpkit-1.1.0/docs/app/docs/getting-started/page.mdx +94 -0
  36. snmpkit-1.1.0/docs/app/docs/introduction/page.mdx +84 -0
  37. snmpkit-1.1.0/docs/app/docs/layout.tsx +60 -0
  38. snmpkit-1.1.0/docs/app/docs/manager/_meta.ts +15 -0
  39. snmpkit-1.1.0/docs/app/docs/manager/advanced/page.mdx +369 -0
  40. snmpkit-1.1.0/docs/app/docs/manager/contexts/page.mdx +276 -0
  41. snmpkit-1.1.0/docs/app/docs/manager/examples/page.mdx +439 -0
  42. snmpkit-1.1.0/docs/app/docs/manager/mibs/page.mdx +317 -0
  43. snmpkit-1.1.0/docs/app/docs/manager/operations/page.mdx +238 -0
  44. snmpkit-1.1.0/docs/app/docs/manager/page.mdx +97 -0
  45. snmpkit-1.1.0/docs/app/docs/manager/performance/page.mdx +108 -0
  46. snmpkit-1.1.0/docs/app/docs/manager/quickstart/page.mdx +161 -0
  47. snmpkit-1.1.0/docs/app/docs/manager/snmpv3/page.mdx +302 -0
  48. snmpkit-1.1.0/docs/app/docs/manager/tables/page.mdx +367 -0
  49. snmpkit-1.1.0/docs/app/docs/manager/transports/page.mdx +330 -0
  50. snmpkit-1.1.0/docs/app/docs/manager/traps/page.mdx +399 -0
  51. snmpkit-1.1.0/docs/app/docs/manager/troubleshooting/page.mdx +434 -0
  52. snmpkit-1.1.0/docs/app/docs/page.tsx +5 -0
  53. snmpkit-1.1.0/docs/app/favicon.ico +0 -0
  54. snmpkit-1.1.0/docs/app/globals.css +17 -0
  55. snmpkit-1.1.0/docs/app/layout.tsx +29 -0
  56. snmpkit-1.1.0/docs/app/page.tsx +372 -0
  57. snmpkit-1.1.0/docs/biome.json +33 -0
  58. snmpkit-1.1.0/docs/bun.lock +1203 -0
  59. snmpkit-1.1.0/docs/components/BenchmarkChart.tsx +161 -0
  60. snmpkit-1.1.0/docs/components/ThemeToggle.tsx +56 -0
  61. snmpkit-1.1.0/docs/components/TocActions.tsx +153 -0
  62. snmpkit-1.1.0/docs/components/TocFooter.tsx +14 -0
  63. snmpkit-1.1.0/docs/mdx-components.ts +11 -0
  64. snmpkit-1.1.0/docs/next-env.d.ts +6 -0
  65. snmpkit-1.1.0/docs/next.config.mjs +13 -0
  66. snmpkit-1.1.0/docs/package-lock.json +7816 -0
  67. snmpkit-1.1.0/docs/package.json +37 -0
  68. snmpkit-1.1.0/docs/postcss.config.mjs +6 -0
  69. snmpkit-1.1.0/docs/public/llms.txt +188 -0
  70. snmpkit-1.1.0/docs/public/logo-dark.svg +10 -0
  71. snmpkit-1.1.0/docs/public/logo-light.svg +10 -0
  72. snmpkit-1.1.0/docs/tsconfig.json +40 -0
  73. snmpkit-1.1.0/llms.txt +206 -0
  74. snmpkit-1.1.0/pyproject.toml +56 -0
  75. snmpkit-1.1.0/python/snmpkit/__init__.py +28 -0
  76. snmpkit-1.1.0/python/snmpkit/agent/__init__.py +25 -0
  77. snmpkit-1.1.0/python/snmpkit/agent/agent.py +283 -0
  78. snmpkit-1.1.0/python/snmpkit/agent/exceptions.py +26 -0
  79. snmpkit-1.1.0/python/snmpkit/agent/handlers.py +242 -0
  80. snmpkit-1.1.0/python/snmpkit/agent/protocol.py +259 -0
  81. snmpkit-1.1.0/python/snmpkit/agent/set_handler.py +71 -0
  82. snmpkit-1.1.0/python/snmpkit/agent/updater.py +83 -0
  83. snmpkit-1.1.0/python/snmpkit/core.pyi +297 -0
  84. snmpkit-1.1.0/python/snmpkit/manager/__init__.py +21 -0
  85. snmpkit-1.1.0/python/snmpkit/manager/exceptions.py +30 -0
  86. snmpkit-1.1.0/python/snmpkit/manager/manager.py +327 -0
  87. snmpkit-1.1.0/python/snmpkit/manager/transport.py +93 -0
  88. snmpkit-1.1.0/python/tests/__init__.py +1 -0
  89. snmpkit-1.1.0/python/tests/agent/__init__.py +0 -0
  90. snmpkit-1.1.0/python/tests/agent/test_agent.py +307 -0
  91. snmpkit-1.1.0/python/tests/agent/test_datastore.py +306 -0
  92. snmpkit-1.1.0/python/tests/agent/test_handlers.py +351 -0
  93. snmpkit-1.1.0/python/tests/agent/test_protocol.py +333 -0
  94. snmpkit-1.1.0/python/tests/agent/test_set_handler.py +261 -0
  95. snmpkit-1.1.0/python/tests/agent/test_updater.py +261 -0
  96. snmpkit-1.1.0/python/tests/agentx/__init__.py +1 -0
  97. snmpkit-1.1.0/python/tests/agentx/test_pdu.py +342 -0
  98. snmpkit-1.1.0/python/tests/manager/__init__.py +1 -0
  99. snmpkit-1.1.0/python/tests/manager/test_exceptions.py +77 -0
  100. snmpkit-1.1.0/python/tests/manager/test_manager.py +334 -0
  101. snmpkit-1.1.0/python/tests/manager/test_transport.py +176 -0
  102. snmpkit-1.1.0/python/tests/network/__init__.py +1 -0
  103. snmpkit-1.1.0/python/tests/network/test_connection.py +7 -0
  104. snmpkit-1.1.0/python/tests/oid/__init__.py +1 -0
  105. snmpkit-1.1.0/python/tests/oid/test_oid.py +272 -0
  106. snmpkit-1.1.0/python/tests/test_core.py +13 -0
  107. snmpkit-1.1.0/src/agentx/bindings.rs +494 -0
  108. snmpkit-1.1.0/src/agentx/bodies.rs +701 -0
  109. snmpkit-1.1.0/src/agentx/header.rs +200 -0
  110. snmpkit-1.1.0/src/agentx/mod.rs +28 -0
  111. snmpkit-1.1.0/src/agentx/parallel.rs +174 -0
  112. snmpkit-1.1.0/src/agentx/pdu.rs +410 -0
  113. snmpkit-1.1.0/src/asn1/ber.rs +636 -0
  114. snmpkit-1.1.0/src/asn1/mod.rs +103 -0
  115. snmpkit-1.1.0/src/lib.rs +123 -0
  116. snmpkit-1.1.0/src/oid/mod.rs +279 -0
  117. snmpkit-1.1.0/src/oid/trie.rs +524 -0
  118. snmpkit-1.1.0/src/snmp/bindings.rs +408 -0
  119. snmpkit-1.1.0/src/snmp/message.rs +306 -0
  120. snmpkit-1.1.0/src/snmp/mod.rs +13 -0
  121. snmpkit-1.1.0/src/snmp/pdu.rs +643 -0
  122. snmpkit-1.1.0/src/snmp/usm.rs +341 -0
  123. snmpkit-1.1.0/src/snmp/v3.rs +434 -0
  124. snmpkit-1.1.0/src/types/mod.rs +254 -0
  125. snmpkit-1.1.0/tests/agentx_tests.rs +43 -0
  126. snmpkit-1.1.0/tests/oid_tests.rs +34 -0
  127. snmpkit-1.1.0/tests/types_tests.rs +29 -0
  128. snmpkit-1.1.0/uv.lock +199 -0
@@ -0,0 +1,63 @@
1
+ name: Bug Report
2
+ description: Report a bug in snmpkit
3
+ labels: ["bug"]
4
+ body:
5
+ - type: markdown
6
+ attributes:
7
+ value: |
8
+ Thanks for reporting a bug! Please fill out the form below.
9
+
10
+ - type: textarea
11
+ id: description
12
+ attributes:
13
+ label: Description
14
+ description: A clear description of the bug
15
+ validations:
16
+ required: true
17
+
18
+ - type: textarea
19
+ id: reproduction
20
+ attributes:
21
+ label: Steps to Reproduce
22
+ description: Minimal code or steps to reproduce the bug
23
+ placeholder: |
24
+ ```python
25
+ from snmpkit.agent import Agent, Updater
26
+ # ...
27
+ ```
28
+ validations:
29
+ required: true
30
+
31
+ - type: textarea
32
+ id: expected
33
+ attributes:
34
+ label: Expected Behavior
35
+ description: What you expected to happen
36
+
37
+ - type: textarea
38
+ id: actual
39
+ attributes:
40
+ label: Actual Behavior
41
+ description: What actually happened
42
+
43
+ - type: input
44
+ id: version
45
+ attributes:
46
+ label: snmpkit Version
47
+ placeholder: "1.0.0"
48
+ validations:
49
+ required: true
50
+
51
+ - type: input
52
+ id: python
53
+ attributes:
54
+ label: Python Version
55
+ placeholder: "3.14.0"
56
+ validations:
57
+ required: true
58
+
59
+ - type: input
60
+ id: os
61
+ attributes:
62
+ label: Operating System
63
+ placeholder: "Ubuntu 24.04"
@@ -0,0 +1,36 @@
1
+ name: Feature Request
2
+ description: Suggest a new feature
3
+ labels: ["enhancement"]
4
+ body:
5
+ - type: markdown
6
+ attributes:
7
+ value: |
8
+ Thanks for suggesting a feature! Please describe what you'd like to see.
9
+
10
+ - type: textarea
11
+ id: problem
12
+ attributes:
13
+ label: Problem
14
+ description: What problem does this feature solve?
15
+ validations:
16
+ required: true
17
+
18
+ - type: textarea
19
+ id: solution
20
+ attributes:
21
+ label: Proposed Solution
22
+ description: How would you like this to work?
23
+ validations:
24
+ required: true
25
+
26
+ - type: textarea
27
+ id: alternatives
28
+ attributes:
29
+ label: Alternatives Considered
30
+ description: Any alternative solutions you've thought about?
31
+
32
+ - type: textarea
33
+ id: context
34
+ attributes:
35
+ label: Additional Context
36
+ description: Any other context, screenshots, or examples
@@ -0,0 +1,86 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+ branches: [main]
8
+
9
+ env:
10
+ CARGO_TERM_COLOR: always
11
+
12
+ jobs:
13
+ test:
14
+ runs-on: ubuntu-latest
15
+ steps:
16
+ - uses: actions/checkout@v4
17
+
18
+ - name: Install Rust
19
+ uses: dtolnay/rust-toolchain@stable
20
+
21
+ - name: Install Python 3.14
22
+ uses: actions/setup-python@v5
23
+ with:
24
+ python-version: "3.14-dev"
25
+
26
+ - name: Install uv
27
+ uses: astral-sh/setup-uv@v4
28
+
29
+ - name: Install dependencies
30
+ run: uv sync --all-extras
31
+
32
+ - name: Run Rust tests
33
+ run: cargo test
34
+
35
+ - name: Run Python tests
36
+ run: uv run pytest
37
+
38
+ lint:
39
+ runs-on: ubuntu-latest
40
+ steps:
41
+ - uses: actions/checkout@v4
42
+
43
+ - name: Install Rust
44
+ uses: dtolnay/rust-toolchain@stable
45
+ with:
46
+ components: clippy, rustfmt
47
+
48
+ - name: Install uv
49
+ uses: astral-sh/setup-uv@v4
50
+
51
+ - name: Rust format check
52
+ run: cargo fmt --check
53
+
54
+ - name: Rust clippy
55
+ run: cargo clippy -- -D warnings
56
+
57
+ - name: Python lint
58
+ run: uvx ruff check .
59
+
60
+ build:
61
+ runs-on: ${{ matrix.os }}
62
+ strategy:
63
+ matrix:
64
+ os: [ubuntu-latest, macos-latest, windows-latest]
65
+ steps:
66
+ - uses: actions/checkout@v4
67
+
68
+ - name: Install Rust
69
+ uses: dtolnay/rust-toolchain@stable
70
+
71
+ - name: Install Python 3.14
72
+ uses: actions/setup-python@v5
73
+ with:
74
+ python-version: "3.14-dev"
75
+
76
+ - name: Install maturin
77
+ run: pip install maturin
78
+
79
+ - name: Build wheel
80
+ run: maturin build --release
81
+
82
+ - name: Upload wheel
83
+ uses: actions/upload-artifact@v4
84
+ with:
85
+ name: wheel-${{ matrix.os }}
86
+ path: target/wheels/*.whl
@@ -0,0 +1,134 @@
1
+ name: Release
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - "v*"
7
+
8
+ jobs:
9
+ # Run tests first
10
+ test:
11
+ runs-on: ubuntu-latest
12
+ steps:
13
+ - uses: actions/checkout@v4
14
+
15
+ - name: Install Rust
16
+ uses: dtolnay/rust-toolchain@stable
17
+
18
+ - name: Install Python 3.14
19
+ uses: actions/setup-python@v5
20
+ with:
21
+ python-version: "3.14-dev"
22
+
23
+ - name: Install uv
24
+ uses: astral-sh/setup-uv@v4
25
+
26
+ - name: Install dependencies
27
+ run: uv sync --all-extras
28
+
29
+ - name: Run Rust tests
30
+ run: cargo test
31
+
32
+ - name: Run Python tests
33
+ run: uv run pytest
34
+
35
+ # Build wheels for all platforms
36
+ build:
37
+ needs: test
38
+ runs-on: ${{ matrix.os }}
39
+ strategy:
40
+ matrix:
41
+ include:
42
+ # Linux x86_64
43
+ - os: ubuntu-latest
44
+ target: x86_64-unknown-linux-gnu
45
+ # Linux aarch64
46
+ - os: ubuntu-latest
47
+ target: aarch64-unknown-linux-gnu
48
+ # macOS x86_64
49
+ - os: macos-latest
50
+ target: x86_64-apple-darwin
51
+ # macOS aarch64 (Apple Silicon)
52
+ - os: macos-latest
53
+ target: aarch64-apple-darwin
54
+ # Windows x86_64
55
+ - os: windows-latest
56
+ target: x86_64-pc-windows-msvc
57
+
58
+ steps:
59
+ - uses: actions/checkout@v4
60
+
61
+ - name: Install Python 3.14
62
+ uses: actions/setup-python@v5
63
+ with:
64
+ python-version: "3.14-dev"
65
+
66
+ - name: Build wheels
67
+ uses: PyO3/maturin-action@v1
68
+ with:
69
+ target: ${{ matrix.target }}
70
+ args: --release --out dist -i python3.14
71
+ manylinux: auto
72
+
73
+ - name: Upload wheels
74
+ uses: actions/upload-artifact@v4
75
+ with:
76
+ name: wheels-${{ matrix.target }}
77
+ path: dist/*.whl
78
+
79
+ # Build source distribution
80
+ sdist:
81
+ needs: test
82
+ runs-on: ubuntu-latest
83
+ steps:
84
+ - uses: actions/checkout@v4
85
+
86
+ - name: Build sdist
87
+ uses: PyO3/maturin-action@v1
88
+ with:
89
+ command: sdist
90
+ args: --out dist
91
+
92
+ - name: Upload sdist
93
+ uses: actions/upload-artifact@v4
94
+ with:
95
+ name: sdist
96
+ path: dist/*.tar.gz
97
+
98
+ # Publish to PyPI
99
+ publish:
100
+ needs: [build, sdist]
101
+ runs-on: ubuntu-latest
102
+ environment: pypi
103
+ permissions:
104
+ id-token: write
105
+ steps:
106
+ - name: Download all artifacts
107
+ uses: actions/download-artifact@v4
108
+ with:
109
+ path: dist
110
+ merge-multiple: true
111
+
112
+ - name: Publish to PyPI
113
+ uses: pypa/gh-action-pypi-publish@release/v1
114
+
115
+ # Create GitHub release
116
+ github-release:
117
+ needs: publish
118
+ runs-on: ubuntu-latest
119
+ permissions:
120
+ contents: write
121
+ steps:
122
+ - uses: actions/checkout@v4
123
+
124
+ - name: Download all artifacts
125
+ uses: actions/download-artifact@v4
126
+ with:
127
+ path: dist
128
+ merge-multiple: true
129
+
130
+ - name: Create GitHub Release
131
+ uses: softprops/action-gh-release@v2
132
+ with:
133
+ files: dist/*
134
+ generate_release_notes: true
@@ -0,0 +1,26 @@
1
+ # Rust
2
+ /target
3
+ Cargo.lock
4
+
5
+ # Python
6
+ __pycache__/
7
+ *.py[cod]
8
+ *.so
9
+ *.egg-info/
10
+ dist/
11
+ build/
12
+ .venv/
13
+ .eggs/
14
+
15
+ # IDE
16
+ .idea/
17
+ .vscode/
18
+ *.swp
19
+
20
+ # Testing
21
+ .pytest_cache/
22
+ .coverage
23
+ htmlcov/
24
+
25
+ # Miscellaneous
26
+ **local.*
@@ -0,0 +1 @@
1
+ 3.14
@@ -0,0 +1,100 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## [Unreleased]
9
+
10
+ ## [1.1.0] - 2026-02-08
11
+
12
+ ### Added
13
+
14
+ - **SNMP Manager API**
15
+ - `Manager` class for querying SNMP devices
16
+ - `get()`, `get_many()`, `get_next()`, `get_bulk()` operations
17
+ - `walk()` async iterator for traversing OID subtrees
18
+ - `set()` for SNMPv2c write operations
19
+ - Full SNMPv1/v2c/v3 support with authentication and privacy
20
+ - UDP transport with configurable timeouts and retries
21
+ - Async context manager for connection lifecycle
22
+
23
+ - **Manager PDUs (RFC 3411-3418)**
24
+ - SNMP GET/GETNEXT/GETBULK/SET request encoding
25
+ - SNMPv3 security model with USM
26
+ - Response decoding with error handling
27
+
28
+ - **ASN.1 BER Encoding**
29
+ - Complete BER encoder for SNMP message construction
30
+ - High-performance Rust implementation
31
+
32
+ - **Exception Hierarchy for Manager**
33
+ - `NoSuchObjectError`, `NoSuchInstanceError`, `EndOfMibViewError`
34
+ - `GenericError` with status and index
35
+
36
+ - **Performance**
37
+ - 170,910 SNMP GET requests/sec
38
+ - 108,857 SNMPv3 requests/sec
39
+ - 389,342 AgentX PDUs/sec
40
+ - 127x faster BER encoding than pure Python
41
+
42
+ - **Documentation**
43
+ - Redesigned landing page with split layout
44
+ - Interactive code snippet with Manager and Agent examples
45
+ - One-click install command copy
46
+
47
+ ### Changed
48
+
49
+ - All Python class attributes are now public (removed underscore prefix)
50
+ - `Manager`: `host`, `port`, `community`, `version`, `timeout`, `retries`, `transport`
51
+ - `Agent`: `agent_id`, `socket_path`, `timeout`, `registrations`, `protocol`
52
+ - `Protocol`: `session_id`, `transaction_id`, `packet_id`
53
+ - `UdpTransport`: `host`, `port`, `timeout`, `retries`, `transport`, `protocol`
54
+
55
+ ## [1.0.1] - 2026-01-23
56
+
57
+ ### Fixed
58
+
59
+ - README images now use raw GitHub URLs for PyPI compatibility
60
+
61
+ ## [1.0.0] - 2026-01-22
62
+
63
+ ### Added
64
+
65
+ - **Rust Core**
66
+ - `Oid` type with parsing, comparison, parent/child operations
67
+ - Radix trie for O(1) OID lookups
68
+ - All SNMP value types: Integer, OctetString, Counter32, Counter64, Gauge32, TimeTicks, IpAddress, ObjectIdentifier, Opaque
69
+ - Complete AgentX PDU encoding/decoding (RFC 2741)
70
+ - Optional parallel encoding with rayon
71
+
72
+ - **Python Agent API**
73
+ - `Agent` class with async/sync entry points
74
+ - `Updater` base class with `set_*` methods for all SNMP types
75
+ - `SetHandler` for SNMP SET operations (test/commit/undo/cleanup)
76
+ - Typed exception hierarchy (`SnmpkitError`, `ConnectionError`, `RegistrationError`, etc.)
77
+ - SNMP context support for multi-tenant scenarios
78
+ - Automatic reconnection on connection loss
79
+ - uvloop integration for high performance
80
+
81
+ - **Performance**
82
+ - PDU encoding 11.5x faster than pyagentx3
83
+ - Value creation 6.4x faster than pyagentx3
84
+ - OID parsing 1.5x faster than pyagentx3
85
+
86
+ - **Documentation**
87
+ - Nextra-based docs site
88
+ - Agent quickstart, updater, set-handler, traps, advanced guides
89
+ - Real-world examples
90
+ - Performance benchmarks
91
+
92
+ ### Technical Requirements
93
+
94
+ - Python 3.14+
95
+ - Rust 1.83.0+
96
+
97
+ [Unreleased]: https://github.com/darhebkf/snmpkit/compare/v1.1.0...HEAD
98
+ [1.1.0]: https://github.com/darhebkf/snmpkit/compare/v1.0.1...v1.1.0
99
+ [1.0.1]: https://github.com/darhebkf/snmpkit/compare/v1.0.0...v1.0.1
100
+ [1.0.0]: https://github.com/darhebkf/snmpkit/releases/tag/v1.0.0
@@ -0,0 +1,95 @@
1
+ # Contributing to snmpkit
2
+
3
+ ## Development Setup
4
+
5
+ 1. Install Rust: https://rustup.rs/
6
+ 2. Install Python 3.14+
7
+ 3. Install uv: `curl -LsSf https://astral.sh/uv/install.sh | sh`
8
+ 4. Clone and install:
9
+
10
+ ```bash
11
+ git clone https://github.com/darhebkf/snmpkit.git
12
+ cd snmpkit
13
+ uv sync --all-extras
14
+ ```
15
+
16
+ ## Building
17
+
18
+ ```bash
19
+ # Development build (uses maturin develop)
20
+ uv run maturin develop
21
+
22
+ # Release build
23
+ uv run maturin build --release
24
+ ```
25
+
26
+ ## Testing
27
+
28
+ ```bash
29
+ # Run all tests
30
+ uv run pytest
31
+
32
+ # Run Rust tests only
33
+ cargo test
34
+
35
+ # Run Python tests only
36
+ uv run pytest python/tests/
37
+ ```
38
+
39
+ ## Linting
40
+
41
+ ```bash
42
+ # Python
43
+ uv run ruff check .
44
+ uv run ruff format .
45
+
46
+ # Rust
47
+ cargo fmt
48
+ cargo clippy
49
+ ```
50
+
51
+ ## Pre-commit Hooks
52
+
53
+ Install pre-commit hooks:
54
+
55
+ ```bash
56
+ uv run pre-commit install
57
+ ```
58
+
59
+ Run manually:
60
+
61
+ ```bash
62
+ uv run pre-commit run --all-files
63
+ ```
64
+
65
+ ## Project Structure
66
+
67
+ ```
68
+ snmpkit/
69
+ ├── src/ # Rust source code
70
+ │ ├── lib.rs # PyO3 module entry point
71
+ │ ├── oid/ # OID type and trie
72
+ │ ├── types/ # SNMP value types
73
+ │ └── agentx/ # AgentX protocol implementation
74
+ ├── python/
75
+ │ └── snmpkit/ # Python package
76
+ │ ├── agent/ # Agent, Updater, SetHandler
77
+ │ └── core.pyi # Type stubs for Rust module
78
+ ├── docs/ # Nextra documentation site
79
+ └── benchmarks/ # Performance benchmarks
80
+ ```
81
+
82
+ ## Pull Requests
83
+
84
+ 1. Fork the repository
85
+ 2. Create a feature branch: `git checkout -b feature/my-feature`
86
+ 3. Make your changes
87
+ 4. Run tests and linting
88
+ 5. Commit with a descriptive message
89
+ 6. Push and open a PR
90
+
91
+ ## Code Style
92
+
93
+ - Rust: Follow rustfmt defaults
94
+ - Python: Follow ruff defaults (based on Black + isort)
95
+ - Commit messages: Use conventional commits format