lightman_ai 1.0.1__py3-none-any.whl → 1.0.3__py3-none-any.whl

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.

Potentially problematic release.


This version of lightman_ai might be problematic. Click here for more details.

lightman_ai/cli.py CHANGED
@@ -91,7 +91,7 @@ def run(
91
91
 
92
92
  Holds no logic. It loads the configuration, calls the main method and returns 0 when succesful .
93
93
  """
94
- load_dotenv(env_file or DEFAULT_ENV_FILE) # TODO refs: #112
94
+ load_dotenv(env_file or DEFAULT_ENV_FILE)
95
95
  configure_sentry()
96
96
 
97
97
  settings = Settings.try_load_from_file(env_file)
@@ -8,8 +8,8 @@ logger = logging.getLogger("lightman")
8
8
  def configure_sentry() -> None:
9
9
  """Configure Sentry for error tracking."""
10
10
  try:
11
- import sentry_sdk
12
- from sentry_sdk.integrations.logging import LoggingIntegration
11
+ import sentry_sdk # noqa: PLC0415
12
+ from sentry_sdk.integrations.logging import LoggingIntegration # noqa: PLC0415
13
13
  except ImportError:
14
14
  logger.warning(
15
15
  "Could not initialize sentry, it is not installed! Add it by installing the project with `lightman-ai[sentry]`."
@@ -1,13 +1,13 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: lightman_ai
3
- Version: 1.0.1
3
+ Version: 1.0.3
4
4
  Summary: LLM-powered cybersecurity news aggregator.
5
- Author-email: sdn4z <imsdn4z@gmail.com>
5
+ Author-email: sdn4z <imsdn4z@gmail.com>, scastlara <s.cast.lara@gmail.com>
6
6
  License-File: LICENSE
7
7
  Requires-Python: <4,>=3.13
8
8
  Requires-Dist: click<9.0.0,>=8.1.7
9
9
  Requires-Dist: httpx<1.0.0,>=0.28.0
10
- Requires-Dist: pydantic-ai-slim[google,openai]>=0.4.4
10
+ Requires-Dist: pydantic-ai-slim[google,openai]<2.0.0,>=1.0.0
11
11
  Requires-Dist: pydantic-settings<3.0.0,>=2.9.1
12
12
  Requires-Dist: python-dotenv<2.0.0,>=1.1.1
13
13
  Requires-Dist: stamina<26.0.0,>=25.1.0
@@ -17,6 +17,13 @@ Requires-Dist: sentry-sdk<3.0.0,>=2.21.0; extra == 'sentry'
17
17
  Description-Content-Type: text/markdown
18
18
 
19
19
  # 🔍 Lightman AI
20
+ ![Build Status](https://github.com/elementsinteractive/lightman-ai/actions/workflows/test.yml/badge.svg)
21
+ [![PyPI version](https://img.shields.io/pypi/v/lightman-ai)](https://pypi.org/project/lightman-ai/)
22
+ [![Docker version](https://img.shields.io/docker/v/elementsinteractive/lightman-ai?label=DockerHub&logo=docker&logoColor=f5f5f5)](https://hub.docker.com/r/elementsinteractive/lightman-ai)
23
+ [![Python Version](https://img.shields.io/badge/python-3.9%20%7C%203.10%20%7C%203.11%20%7C%203.12%20%7C%203.13-blue?logo=python&logoColor=yellow)](https://pypi.org/project/lightman-ai/)
24
+ [![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)
25
+ [![License](https://img.shields.io/github/license/elementsinteractive/lightman-ai)](LICENSE)
26
+
20
27
 
21
28
  > LLM-Powered Cybersecurity News Intelligence Platform
22
29
 
@@ -98,13 +105,30 @@ Lightman AI is an intelligent cybersecurity news aggregation and risk assessment
98
105
  ```
99
106
 
100
107
  3. **Run with Docker**:
108
+
101
109
  ```bash
102
110
  docker run --rm \
103
111
  -v $(pwd)/lightman.toml:/app/lightman.toml \
104
112
  -e OPENAI_API_KEY="your-api-key" \
105
113
  elementsinteractive/lightman-ai:latest \
106
- lightman run --config-file /app/lightman.toml --score 7
114
+ run --config-file /app/lightman.toml --score 8 --agent openai
107
115
  ```
116
+
117
+ You use a .env file instead of setting the environment variables through the cli
118
+
119
+ ```bash
120
+ cp .env.example .env
121
+ ```
122
+
123
+ Fill it with your values and run:
124
+
125
+ ```bash
126
+ docker run --rm \
127
+ -v $(pwd)/lightman.toml:/app/lightman.toml \
128
+ --env-file .env \
129
+ elementsinteractive/lightman-ai:latest \
130
+ run --config-file /app/lightman.toml --score 8 --agent openai
131
+ ```
108
132
 
109
133
  ## 🔧 Usage
110
134
 
@@ -151,17 +175,33 @@ prompt = 'development' # Prompt template to use
151
175
  service_desk_project_key = "SEC"
152
176
  service_desk_request_id_type = "incident"
153
177
 
178
+ # alternative configuration
179
+ [malware]
180
+ agent = 'openai' # AI agent to use (openai, gemini)
181
+ score_threshold = 8 # Minimum relevance score (1-10)
182
+ prompt = 'malware' # Prompt template to use
183
+
184
+ # Optional: Service desk integration
185
+ service_desk_project_key = "SEC"
186
+ service_desk_request_id_type = "incident"
187
+
154
188
  [prompts]
155
189
  development = """
156
190
  Analyze the following cybersecurity news articles and determine their relevance to our organization.
157
191
  Rate each article from 1-10 based on potential impact and urgency.
158
- Focus on: data breaches, malware, vulnerabilities, and threat intelligence.
159
- """
192
+ Focus on vulnerabilities."""
193
+
194
+ malware = """
195
+ Analyze the following cybersecurity news articles and determine their relevance to our organization.
196
+ Rate each article from 1-10 based on potential impact and urgency.
197
+ Focus on malware."""
160
198
 
161
199
  custom_prompt = """
162
200
  Your custom analysis prompt here...
163
201
  """
164
202
  ```
203
+ Note how it supports different configurations and prompts.
204
+
165
205
 
166
206
  It also supports having separate files for your prompts and your configuration settings. Specify the path with `--prompt`.
167
207
 
@@ -218,7 +258,7 @@ lightman run --agent openai --score 8 --prompt security_critical --yesterday
218
258
 
219
259
  ### Development Installation
220
260
  In order to fully use the provided setup for local development and testing, this project requires the following dependencies:
221
- - Python 3.13
261
+ - [Python 3.13](https://www.python.org/downloads/release/python-3130/)
222
262
  - [just](https://github.com/casey/just)
223
263
  - [uv](https://docs.astral.sh/uv/getting-started/installation/)
224
264
 
@@ -1,5 +1,5 @@
1
1
  lightman_ai/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
- lightman_ai/cli.py,sha256=u9zuj3ksDu4bPKd_Cb409m-la12ctZjFEg8GSER8ykc,4685
2
+ lightman_ai/cli.py,sha256=J4YiKMkbWIS6wh3GOQ4a67lOc-7t-4oR70EAFzpp7vk,4666
3
3
  lightman_ai/constants.py,sha256=qfZgcTLK51l--JDhns-uRANjccFEPN6iTFsJKn8T4vs,101
4
4
  lightman_ai/exceptions.py,sha256=bEnVe7kW-x3FR70wrx7H4RCoZBGe9o5o6gDwuYv6oio,179
5
5
  lightman_ai/main.py,sha256=ZA8XJfbmBaEu8-7sz02_xzb3Do_J_KaP0Tr-1Ve8SWU,3683
@@ -21,7 +21,7 @@ lightman_ai/article/models.py,sha256=JZaBsqzw7MxC3qORUSJqxru9iSHsbLrgNW5nFc2N6Ks
21
21
  lightman_ai/core/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
22
22
  lightman_ai/core/config.py,sha256=ppWNoNivNqxGi4TOZIMaTGo46W7Ic1a8cO8hWVAkkps,3031
23
23
  lightman_ai/core/exceptions.py,sha256=c13ilQ80fGmiZZpVyZN5Kpuz5mKNqtzfRXVczHBS0SM,237
24
- lightman_ai/core/sentry.py,sha256=kqO2sBX_29v4qpmcYyhOBuG0hv82OkDBWh1rcyiKVWk,1375
24
+ lightman_ai/core/sentry.py,sha256=c_9K-csZEe92Pm71dK-B3GRdkFQ4Pc1cjJ2AxJ1geas,1409
25
25
  lightman_ai/core/settings.py,sha256=DSApQZS8xypWxrK2RMILZFY78GI0Ze2lcfUH2HluM2Q,976
26
26
  lightman_ai/integrations/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
27
27
  lightman_ai/integrations/service_desk/__init__.py,sha256=Ijs7_ysJVwiT_Y1U8iPOV17E7dtkVzNXL00d8cgyaCc,66
@@ -31,8 +31,8 @@ lightman_ai/integrations/service_desk/integration.py,sha256=5r3bipao_apaDWLRiH4o
31
31
  lightman_ai/sources/base.py,sha256=M_n9H9GdcX2tbBcYkiakDxHCnuwP9fV4BQhNAadBubQ,242
32
32
  lightman_ai/sources/exceptions.py,sha256=X43BZ6hx-lZAEyM2q5PQXBw3vKPDx5nmY_uRiuITK9s,379
33
33
  lightman_ai/sources/the_hacker_news.py,sha256=JTqbAJ1Pf8QKxvwFg6vWmymgj8LtUpIV6hD0KMOwMG8,3034
34
- lightman_ai-1.0.1.dist-info/METADATA,sha256=TLuQb_-Mqy4LwDGIxiJ2ldugtzg994jkBPnPCk629bs,10804
35
- lightman_ai-1.0.1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
36
- lightman_ai-1.0.1.dist-info/entry_points.txt,sha256=9H7Ji-zxbCWAaVL5Yg4fG5va0H_5Tr2kMGGMsghaAas,60
37
- lightman_ai-1.0.1.dist-info/licenses/LICENSE,sha256=NhxDmY3AGgeEsYHIfDGLNkzBVX94pARRDS8H46JZ1zQ,1076
38
- lightman_ai-1.0.1.dist-info/RECORD,,
34
+ lightman_ai-1.0.3.dist-info/METADATA,sha256=e2S9e9LiUojyNxzA-GOMSuJ78ynW0MtuS5yaNtHcQo0,12696
35
+ lightman_ai-1.0.3.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
36
+ lightman_ai-1.0.3.dist-info/entry_points.txt,sha256=9H7Ji-zxbCWAaVL5Yg4fG5va0H_5Tr2kMGGMsghaAas,60
37
+ lightman_ai-1.0.3.dist-info/licenses/LICENSE,sha256=NhxDmY3AGgeEsYHIfDGLNkzBVX94pARRDS8H46JZ1zQ,1076
38
+ lightman_ai-1.0.3.dist-info/RECORD,,