nppx 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.
- nppx-0.1.0/PKG-INFO +27 -0
- nppx-0.1.0/README.md +18 -0
- nppx-0.1.0/npp.py +21 -0
- nppx-0.1.0/nppx.egg-info/PKG-INFO +27 -0
- nppx-0.1.0/nppx.egg-info/SOURCES.txt +7 -0
- nppx-0.1.0/nppx.egg-info/dependency_links.txt +1 -0
- nppx-0.1.0/nppx.egg-info/top_level.txt +1 -0
- nppx-0.1.0/pyproject.toml +17 -0
- nppx-0.1.0/setup.cfg +4 -0
nppx-0.1.0/PKG-INFO
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: nppx
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Dead-simple Claude client: import and ask, conversation and file ingest built in.
|
|
5
|
+
License: MIT
|
|
6
|
+
Project-URL: Homepage, https://oxide.fun
|
|
7
|
+
Requires-Python: >=3.8
|
|
8
|
+
Description-Content-Type: text/markdown
|
|
9
|
+
|
|
10
|
+
# npp
|
|
11
|
+
|
|
12
|
+
Import and ask. Conversation state and file ingestion are built in. No API key, no config.
|
|
13
|
+
|
|
14
|
+
```python
|
|
15
|
+
from npp import ask
|
|
16
|
+
|
|
17
|
+
ask("Summarize this.", file="report.txt")
|
|
18
|
+
ask("Now list the risks.") # remembers the previous turn
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
Separate conversation:
|
|
22
|
+
|
|
23
|
+
```python
|
|
24
|
+
from npp import Chat
|
|
25
|
+
c = Chat()
|
|
26
|
+
c.ask("hello")
|
|
27
|
+
```
|
nppx-0.1.0/README.md
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# npp
|
|
2
|
+
|
|
3
|
+
Import and ask. Conversation state and file ingestion are built in. No API key, no config.
|
|
4
|
+
|
|
5
|
+
```python
|
|
6
|
+
from npp import ask
|
|
7
|
+
|
|
8
|
+
ask("Summarize this.", file="report.txt")
|
|
9
|
+
ask("Now list the risks.") # remembers the previous turn
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
Separate conversation:
|
|
13
|
+
|
|
14
|
+
```python
|
|
15
|
+
from npp import Chat
|
|
16
|
+
c = Chat()
|
|
17
|
+
c.ask("hello")
|
|
18
|
+
```
|
nppx-0.1.0/npp.py
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import json, urllib.request
|
|
2
|
+
|
|
3
|
+
ENDPOINT = "https://oxide.fun/ask/"
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
class Chat:
|
|
7
|
+
def __init__(self):
|
|
8
|
+
self.messages = []
|
|
9
|
+
|
|
10
|
+
def ask(self, prompt="", file=None):
|
|
11
|
+
if file:
|
|
12
|
+
with open(file, encoding="utf-8", errors="replace") as f:
|
|
13
|
+
prompt = f"{f.read()}\n\n{prompt}".strip()
|
|
14
|
+
self.messages.append({"role": "user", "content": prompt})
|
|
15
|
+
reply = urllib.request.urlopen(ENDPOINT, json.dumps(self.messages).encode()).read().decode()
|
|
16
|
+
self.messages.append({"role": "assistant", "content": reply})
|
|
17
|
+
return reply
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
_default = Chat()
|
|
21
|
+
ask = _default.ask
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: nppx
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Dead-simple Claude client: import and ask, conversation and file ingest built in.
|
|
5
|
+
License: MIT
|
|
6
|
+
Project-URL: Homepage, https://oxide.fun
|
|
7
|
+
Requires-Python: >=3.8
|
|
8
|
+
Description-Content-Type: text/markdown
|
|
9
|
+
|
|
10
|
+
# npp
|
|
11
|
+
|
|
12
|
+
Import and ask. Conversation state and file ingestion are built in. No API key, no config.
|
|
13
|
+
|
|
14
|
+
```python
|
|
15
|
+
from npp import ask
|
|
16
|
+
|
|
17
|
+
ask("Summarize this.", file="report.txt")
|
|
18
|
+
ask("Now list the risks.") # remembers the previous turn
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
Separate conversation:
|
|
22
|
+
|
|
23
|
+
```python
|
|
24
|
+
from npp import Chat
|
|
25
|
+
c = Chat()
|
|
26
|
+
c.ask("hello")
|
|
27
|
+
```
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
npp
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "nppx"
|
|
3
|
+
version = "0.1.0"
|
|
4
|
+
description = "Dead-simple Claude client: import and ask, conversation and file ingest built in."
|
|
5
|
+
readme = "README.md"
|
|
6
|
+
requires-python = ">=3.8"
|
|
7
|
+
license = {text = "MIT"}
|
|
8
|
+
|
|
9
|
+
[project.urls]
|
|
10
|
+
Homepage = "https://oxide.fun"
|
|
11
|
+
|
|
12
|
+
[build-system]
|
|
13
|
+
requires = ["setuptools>=61"]
|
|
14
|
+
build-backend = "setuptools.build_meta"
|
|
15
|
+
|
|
16
|
+
[tool.setuptools]
|
|
17
|
+
py-modules = ["npp"]
|
nppx-0.1.0/setup.cfg
ADDED