swarmauri_tool_qrcodegenerator 0.9.0.dev4__tar.gz → 0.9.2.dev6__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.
- swarmauri_tool_qrcodegenerator-0.9.2.dev6/PKG-INFO +172 -0
- swarmauri_tool_qrcodegenerator-0.9.2.dev6/README.md +147 -0
- {swarmauri_tool_qrcodegenerator-0.9.0.dev4 → swarmauri_tool_qrcodegenerator-0.9.2.dev6}/pyproject.toml +12 -1
- swarmauri_tool_qrcodegenerator-0.9.0.dev4/PKG-INFO +0 -68
- swarmauri_tool_qrcodegenerator-0.9.0.dev4/README.md +0 -49
- {swarmauri_tool_qrcodegenerator-0.9.0.dev4 → swarmauri_tool_qrcodegenerator-0.9.2.dev6}/LICENSE +0 -0
- {swarmauri_tool_qrcodegenerator-0.9.0.dev4 → swarmauri_tool_qrcodegenerator-0.9.2.dev6}/swarmauri_tool_qrcodegenerator/QrCodeGeneratorTool.py +0 -0
- {swarmauri_tool_qrcodegenerator-0.9.0.dev4 → swarmauri_tool_qrcodegenerator-0.9.2.dev6}/swarmauri_tool_qrcodegenerator/__init__.py +0 -0
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: swarmauri_tool_qrcodegenerator
|
|
3
|
+
Version: 0.9.2.dev6
|
|
4
|
+
Summary: Swarmauri QR Code Generator Tool.
|
|
5
|
+
License-Expression: Apache-2.0
|
|
6
|
+
License-File: LICENSE
|
|
7
|
+
Keywords: swarmauri,tool,qrcodegenerator,code,generator
|
|
8
|
+
Author: Jacob Stewart
|
|
9
|
+
Author-email: jacob@swarmauri.com
|
|
10
|
+
Requires-Python: >=3.10,<3.13
|
|
11
|
+
Classifier: License :: OSI Approved :: Apache Software License
|
|
12
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
15
|
+
Classifier: Natural Language :: English
|
|
16
|
+
Classifier: Development Status :: 3 - Alpha
|
|
17
|
+
Classifier: Intended Audience :: Developers
|
|
18
|
+
Classifier: Topic :: Software Development :: Libraries :: Application Frameworks
|
|
19
|
+
Requires-Dist: qrcode (>=7.3.1)
|
|
20
|
+
Requires-Dist: swarmauri_base
|
|
21
|
+
Requires-Dist: swarmauri_core
|
|
22
|
+
Requires-Dist: swarmauri_standard
|
|
23
|
+
Description-Content-Type: text/markdown
|
|
24
|
+
|
|
25
|
+

|
|
26
|
+
|
|
27
|
+
<p align="center">
|
|
28
|
+
<a href="https://pypi.org/project/swarmauri_tool_qrcodegenerator/">
|
|
29
|
+
<img src="https://img.shields.io/pypi/dm/swarmauri_tool_qrcodegenerator" alt="PyPI - Downloads"/></a>
|
|
30
|
+
<a href="https://hits.sh/github.com/swarmauri/swarmauri-sdk/tree/master/pkgs/community/swarmauri_tool_qrcodegenerator/">
|
|
31
|
+
<img alt="Hits" src="https://hits.sh/github.com/swarmauri/swarmauri-sdk/tree/master/pkgs/community/swarmauri_tool_qrcodegenerator.svg"/></a>
|
|
32
|
+
<a href="https://pypi.org/project/swarmauri_tool_qrcodegenerator/">
|
|
33
|
+
<img src="https://img.shields.io/pypi/pyversions/swarmauri_tool_qrcodegenerator" alt="PyPI - Python Version"/></a>
|
|
34
|
+
<a href="https://pypi.org/project/swarmauri_tool_qrcodegenerator/">
|
|
35
|
+
<img src="https://img.shields.io/pypi/l/swarmauri_tool_qrcodegenerator" alt="PyPI - License"/></a>
|
|
36
|
+
<a href="https://pypi.org/project/swarmauri_tool_qrcodegenerator/">
|
|
37
|
+
<img src="https://img.shields.io/pypi/v/swarmauri_tool_qrcodegenerator?label=swarmauri_tool_qrcodegenerator&color=green" alt="PyPI - swarmauri_tool_qrcodegenerator"/></a>
|
|
38
|
+
</p>
|
|
39
|
+
|
|
40
|
+
---
|
|
41
|
+
|
|
42
|
+
# Swarmauri Tool · QR Code Generator
|
|
43
|
+
|
|
44
|
+
A Swarmauri tool that converts text payloads into QR codes and returns the image data as a Base64 string. Plug it into conversational agents, marketing workflows, or automation scripts that need scannable hand-offs (URLs, Wi-Fi credentials, one-time tokens, etc.).
|
|
45
|
+
|
|
46
|
+
- Backed by `qrcode`/Pillow to produce standards-compliant QR codes.
|
|
47
|
+
- Outputs Base64 so responses can be embedded directly in JSON, HTML, or rich chat messages.
|
|
48
|
+
- Exposed through the standard Swarmauri tool interface for drop-in registration alongside other capabilities.
|
|
49
|
+
|
|
50
|
+
## Requirements
|
|
51
|
+
|
|
52
|
+
- Python 3.10 – 3.13.
|
|
53
|
+
- `qrcode` (installs with its Pillow dependency) and Swarmauri base packages (`swarmauri_base`, `swarmauri_standard`, `pydantic`).
|
|
54
|
+
- Optional: downstream consumers often decode the Base64 string using Pillow or write it to disk; ensure those environments can handle binary data.
|
|
55
|
+
|
|
56
|
+
## Installation
|
|
57
|
+
|
|
58
|
+
Choose the tooling that matches your project; each command resolves transitive dependencies.
|
|
59
|
+
|
|
60
|
+
**pip**
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
pip install swarmauri_tool_qrcodegenerator
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
**Poetry**
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
poetry add swarmauri_tool_qrcodegenerator
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
**uv**
|
|
73
|
+
|
|
74
|
+
```bash
|
|
75
|
+
# Add to the current project and update uv.lock
|
|
76
|
+
uv add swarmauri_tool_qrcodegenerator
|
|
77
|
+
|
|
78
|
+
# or install into the active environment without editing pyproject.toml
|
|
79
|
+
uv pip install swarmauri_tool_qrcodegenerator
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
> Tip: Pillow requires native image libraries on some Linux distributions (e.g., `libjpeg`, `zlib`). Install OS packages before running the commands above in minimal containers.
|
|
83
|
+
|
|
84
|
+
## Quick Start
|
|
85
|
+
|
|
86
|
+
```python
|
|
87
|
+
import base64
|
|
88
|
+
from swarmauri_tool_qrcodegenerator import QrCodeGeneratorTool
|
|
89
|
+
|
|
90
|
+
qr_tool = QrCodeGeneratorTool()
|
|
91
|
+
result = qr_tool("https://docs.swarmauri.ai")
|
|
92
|
+
|
|
93
|
+
image_b64 = result["image_b64"]
|
|
94
|
+
with open("docs-qrcode.png", "wb") as f:
|
|
95
|
+
f.write(base64.b64decode(image_b64))
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
The output image uses the tool's default QR code settings (`version=1`, low error correction, black modules on white background). Adjust presentation after decoding if you need different colors or scaling.
|
|
99
|
+
|
|
100
|
+
## Usage Scenarios
|
|
101
|
+
|
|
102
|
+
### Embed QR Codes in Agent Responses
|
|
103
|
+
|
|
104
|
+
```python
|
|
105
|
+
from swarmauri_core.agent.Agent import Agent
|
|
106
|
+
from swarmauri_core.messages.HumanMessage import HumanMessage
|
|
107
|
+
from swarmauri_standard.tools.registry import ToolRegistry
|
|
108
|
+
from swarmauri_tool_qrcodegenerator import QrCodeGeneratorTool
|
|
109
|
+
|
|
110
|
+
registry = ToolRegistry()
|
|
111
|
+
registry.register(QrCodeGeneratorTool())
|
|
112
|
+
agent = Agent(tool_registry=registry)
|
|
113
|
+
|
|
114
|
+
message = HumanMessage(content="Create a QR code for https://status.mycompany.com")
|
|
115
|
+
response = agent.run(message)
|
|
116
|
+
print(response)
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
Agents can attach the Base64 image to chat payloads so end users scan the code without additional steps.
|
|
120
|
+
|
|
121
|
+
### Publish Dynamic Event Badges
|
|
122
|
+
|
|
123
|
+
```python
|
|
124
|
+
import base64
|
|
125
|
+
from pathlib import Path
|
|
126
|
+
from swarmauri_tool_qrcodegenerator import QrCodeGeneratorTool
|
|
127
|
+
|
|
128
|
+
qr_tool = QrCodeGeneratorTool()
|
|
129
|
+
attendees = {
|
|
130
|
+
"alice": "ticket:EVT-001-A1B2",
|
|
131
|
+
"bob": "ticket:EVT-002-B3C4",
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
badges_dir = Path("badges")
|
|
135
|
+
badges_dir.mkdir(exist_ok=True)
|
|
136
|
+
|
|
137
|
+
for name, token in attendees.items():
|
|
138
|
+
b64_img = qr_tool(token)["image_b64"]
|
|
139
|
+
(badges_dir / f"{name}.png").write_bytes(base64.b64decode(b64_img))
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
Generate per-attendee QR codes that scanners can translate into ticket tokens at check-in.
|
|
143
|
+
|
|
144
|
+
### Serve Codes Over HTTP
|
|
145
|
+
|
|
146
|
+
```python
|
|
147
|
+
import base64
|
|
148
|
+
from fastapi import FastAPI, Response
|
|
149
|
+
from swarmauri_tool_qrcodegenerator import QrCodeGeneratorTool
|
|
150
|
+
|
|
151
|
+
app = FastAPI()
|
|
152
|
+
qr_tool = QrCodeGeneratorTool()
|
|
153
|
+
|
|
154
|
+
@app.get("/qr")
|
|
155
|
+
def qr_endpoint(data: str):
|
|
156
|
+
result = qr_tool(data)
|
|
157
|
+
png_bytes = base64.b64decode(result["image_b64"])
|
|
158
|
+
return Response(content=png_bytes, media_type="image/png")
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
Expose an API that transforms arbitrary data into QR codes your front-end can display.
|
|
162
|
+
|
|
163
|
+
## Troubleshooting
|
|
164
|
+
|
|
165
|
+
- **Blank or unreadable codes** – Confirm the Base64 string is decoded to a PNG (`base64.b64decode(...)`). Avoid writing the raw Base64 text directly to file.
|
|
166
|
+
- **Binary dependency errors (Pillow)** – Install platform-specific libraries (`apt-get install libjpeg-dev zlib1g-dev`, etc.) before installing the package, especially in slim containers.
|
|
167
|
+
- **Large payloads** – Version 1 QR codes have size constraints (~17 alphanumeric characters). Fork the tool or extend it to allow larger versions if you need to encode lengthy data.
|
|
168
|
+
|
|
169
|
+
## License
|
|
170
|
+
|
|
171
|
+
`swarmauri_tool_qrcodegenerator` is released under the Apache 2.0 License. See `LICENSE` for details.
|
|
172
|
+
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+

|
|
2
|
+
|
|
3
|
+
<p align="center">
|
|
4
|
+
<a href="https://pypi.org/project/swarmauri_tool_qrcodegenerator/">
|
|
5
|
+
<img src="https://img.shields.io/pypi/dm/swarmauri_tool_qrcodegenerator" alt="PyPI - Downloads"/></a>
|
|
6
|
+
<a href="https://hits.sh/github.com/swarmauri/swarmauri-sdk/tree/master/pkgs/community/swarmauri_tool_qrcodegenerator/">
|
|
7
|
+
<img alt="Hits" src="https://hits.sh/github.com/swarmauri/swarmauri-sdk/tree/master/pkgs/community/swarmauri_tool_qrcodegenerator.svg"/></a>
|
|
8
|
+
<a href="https://pypi.org/project/swarmauri_tool_qrcodegenerator/">
|
|
9
|
+
<img src="https://img.shields.io/pypi/pyversions/swarmauri_tool_qrcodegenerator" alt="PyPI - Python Version"/></a>
|
|
10
|
+
<a href="https://pypi.org/project/swarmauri_tool_qrcodegenerator/">
|
|
11
|
+
<img src="https://img.shields.io/pypi/l/swarmauri_tool_qrcodegenerator" alt="PyPI - License"/></a>
|
|
12
|
+
<a href="https://pypi.org/project/swarmauri_tool_qrcodegenerator/">
|
|
13
|
+
<img src="https://img.shields.io/pypi/v/swarmauri_tool_qrcodegenerator?label=swarmauri_tool_qrcodegenerator&color=green" alt="PyPI - swarmauri_tool_qrcodegenerator"/></a>
|
|
14
|
+
</p>
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
# Swarmauri Tool · QR Code Generator
|
|
19
|
+
|
|
20
|
+
A Swarmauri tool that converts text payloads into QR codes and returns the image data as a Base64 string. Plug it into conversational agents, marketing workflows, or automation scripts that need scannable hand-offs (URLs, Wi-Fi credentials, one-time tokens, etc.).
|
|
21
|
+
|
|
22
|
+
- Backed by `qrcode`/Pillow to produce standards-compliant QR codes.
|
|
23
|
+
- Outputs Base64 so responses can be embedded directly in JSON, HTML, or rich chat messages.
|
|
24
|
+
- Exposed through the standard Swarmauri tool interface for drop-in registration alongside other capabilities.
|
|
25
|
+
|
|
26
|
+
## Requirements
|
|
27
|
+
|
|
28
|
+
- Python 3.10 – 3.13.
|
|
29
|
+
- `qrcode` (installs with its Pillow dependency) and Swarmauri base packages (`swarmauri_base`, `swarmauri_standard`, `pydantic`).
|
|
30
|
+
- Optional: downstream consumers often decode the Base64 string using Pillow or write it to disk; ensure those environments can handle binary data.
|
|
31
|
+
|
|
32
|
+
## Installation
|
|
33
|
+
|
|
34
|
+
Choose the tooling that matches your project; each command resolves transitive dependencies.
|
|
35
|
+
|
|
36
|
+
**pip**
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
pip install swarmauri_tool_qrcodegenerator
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
**Poetry**
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
poetry add swarmauri_tool_qrcodegenerator
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
**uv**
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
# Add to the current project and update uv.lock
|
|
52
|
+
uv add swarmauri_tool_qrcodegenerator
|
|
53
|
+
|
|
54
|
+
# or install into the active environment without editing pyproject.toml
|
|
55
|
+
uv pip install swarmauri_tool_qrcodegenerator
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
> Tip: Pillow requires native image libraries on some Linux distributions (e.g., `libjpeg`, `zlib`). Install OS packages before running the commands above in minimal containers.
|
|
59
|
+
|
|
60
|
+
## Quick Start
|
|
61
|
+
|
|
62
|
+
```python
|
|
63
|
+
import base64
|
|
64
|
+
from swarmauri_tool_qrcodegenerator import QrCodeGeneratorTool
|
|
65
|
+
|
|
66
|
+
qr_tool = QrCodeGeneratorTool()
|
|
67
|
+
result = qr_tool("https://docs.swarmauri.ai")
|
|
68
|
+
|
|
69
|
+
image_b64 = result["image_b64"]
|
|
70
|
+
with open("docs-qrcode.png", "wb") as f:
|
|
71
|
+
f.write(base64.b64decode(image_b64))
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
The output image uses the tool's default QR code settings (`version=1`, low error correction, black modules on white background). Adjust presentation after decoding if you need different colors or scaling.
|
|
75
|
+
|
|
76
|
+
## Usage Scenarios
|
|
77
|
+
|
|
78
|
+
### Embed QR Codes in Agent Responses
|
|
79
|
+
|
|
80
|
+
```python
|
|
81
|
+
from swarmauri_core.agent.Agent import Agent
|
|
82
|
+
from swarmauri_core.messages.HumanMessage import HumanMessage
|
|
83
|
+
from swarmauri_standard.tools.registry import ToolRegistry
|
|
84
|
+
from swarmauri_tool_qrcodegenerator import QrCodeGeneratorTool
|
|
85
|
+
|
|
86
|
+
registry = ToolRegistry()
|
|
87
|
+
registry.register(QrCodeGeneratorTool())
|
|
88
|
+
agent = Agent(tool_registry=registry)
|
|
89
|
+
|
|
90
|
+
message = HumanMessage(content="Create a QR code for https://status.mycompany.com")
|
|
91
|
+
response = agent.run(message)
|
|
92
|
+
print(response)
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
Agents can attach the Base64 image to chat payloads so end users scan the code without additional steps.
|
|
96
|
+
|
|
97
|
+
### Publish Dynamic Event Badges
|
|
98
|
+
|
|
99
|
+
```python
|
|
100
|
+
import base64
|
|
101
|
+
from pathlib import Path
|
|
102
|
+
from swarmauri_tool_qrcodegenerator import QrCodeGeneratorTool
|
|
103
|
+
|
|
104
|
+
qr_tool = QrCodeGeneratorTool()
|
|
105
|
+
attendees = {
|
|
106
|
+
"alice": "ticket:EVT-001-A1B2",
|
|
107
|
+
"bob": "ticket:EVT-002-B3C4",
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
badges_dir = Path("badges")
|
|
111
|
+
badges_dir.mkdir(exist_ok=True)
|
|
112
|
+
|
|
113
|
+
for name, token in attendees.items():
|
|
114
|
+
b64_img = qr_tool(token)["image_b64"]
|
|
115
|
+
(badges_dir / f"{name}.png").write_bytes(base64.b64decode(b64_img))
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
Generate per-attendee QR codes that scanners can translate into ticket tokens at check-in.
|
|
119
|
+
|
|
120
|
+
### Serve Codes Over HTTP
|
|
121
|
+
|
|
122
|
+
```python
|
|
123
|
+
import base64
|
|
124
|
+
from fastapi import FastAPI, Response
|
|
125
|
+
from swarmauri_tool_qrcodegenerator import QrCodeGeneratorTool
|
|
126
|
+
|
|
127
|
+
app = FastAPI()
|
|
128
|
+
qr_tool = QrCodeGeneratorTool()
|
|
129
|
+
|
|
130
|
+
@app.get("/qr")
|
|
131
|
+
def qr_endpoint(data: str):
|
|
132
|
+
result = qr_tool(data)
|
|
133
|
+
png_bytes = base64.b64decode(result["image_b64"])
|
|
134
|
+
return Response(content=png_bytes, media_type="image/png")
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
Expose an API that transforms arbitrary data into QR codes your front-end can display.
|
|
138
|
+
|
|
139
|
+
## Troubleshooting
|
|
140
|
+
|
|
141
|
+
- **Blank or unreadable codes** – Confirm the Base64 string is decoded to a PNG (`base64.b64decode(...)`). Avoid writing the raw Base64 text directly to file.
|
|
142
|
+
- **Binary dependency errors (Pillow)** – Install platform-specific libraries (`apt-get install libjpeg-dev zlib1g-dev`, etc.) before installing the package, especially in slim containers.
|
|
143
|
+
- **Large payloads** – Version 1 QR codes have size constraints (~17 alphanumeric characters). Fork the tool or extend it to allow larger versions if you need to encode lengthy data.
|
|
144
|
+
|
|
145
|
+
## License
|
|
146
|
+
|
|
147
|
+
`swarmauri_tool_qrcodegenerator` is released under the Apache 2.0 License. See `LICENSE` for details.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "swarmauri_tool_qrcodegenerator"
|
|
3
|
-
version = "0.9.
|
|
3
|
+
version = "0.9.2.dev6"
|
|
4
4
|
description = "Swarmauri QR Code Generator Tool."
|
|
5
5
|
license = "Apache-2.0"
|
|
6
6
|
readme = "README.md"
|
|
@@ -11,6 +11,10 @@ classifiers = [
|
|
|
11
11
|
"Programming Language :: Python :: 3.10",
|
|
12
12
|
"Programming Language :: Python :: 3.11",
|
|
13
13
|
"Programming Language :: Python :: 3.12",
|
|
14
|
+
"Natural Language :: English",
|
|
15
|
+
"Development Status :: 3 - Alpha",
|
|
16
|
+
"Intended Audience :: Developers",
|
|
17
|
+
"Topic :: Software Development :: Libraries :: Application Frameworks",
|
|
14
18
|
]
|
|
15
19
|
authors = [{ name = "Jacob Stewart", email = "jacob@swarmauri.com" }]
|
|
16
20
|
dependencies = [
|
|
@@ -19,6 +23,13 @@ dependencies = [
|
|
|
19
23
|
"swarmauri_base",
|
|
20
24
|
"swarmauri_standard",
|
|
21
25
|
]
|
|
26
|
+
keywords = [
|
|
27
|
+
"swarmauri",
|
|
28
|
+
"tool",
|
|
29
|
+
"qrcodegenerator",
|
|
30
|
+
"code",
|
|
31
|
+
"generator",
|
|
32
|
+
]
|
|
22
33
|
|
|
23
34
|
[tool.uv.sources]
|
|
24
35
|
swarmauri_core = { workspace = true }
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.3
|
|
2
|
-
Name: swarmauri_tool_qrcodegenerator
|
|
3
|
-
Version: 0.9.0.dev4
|
|
4
|
-
Summary: Swarmauri QR Code Generator Tool.
|
|
5
|
-
License: Apache-2.0
|
|
6
|
-
Author: Jacob Stewart
|
|
7
|
-
Author-email: jacob@swarmauri.com
|
|
8
|
-
Requires-Python: >=3.10,<3.13
|
|
9
|
-
Classifier: License :: OSI Approved :: Apache Software License
|
|
10
|
-
Classifier: Programming Language :: Python :: 3.10
|
|
11
|
-
Classifier: Programming Language :: Python :: 3.11
|
|
12
|
-
Classifier: Programming Language :: Python :: 3.12
|
|
13
|
-
Requires-Dist: qrcode (>=7.3.1)
|
|
14
|
-
Requires-Dist: swarmauri_base
|
|
15
|
-
Requires-Dist: swarmauri_core
|
|
16
|
-
Requires-Dist: swarmauri_standard
|
|
17
|
-
Description-Content-Type: text/markdown
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-

|
|
21
|
-
|
|
22
|
-
<p align="center">
|
|
23
|
-
<a href="https://pypi.org/project/swarmauri_tool_qrcodegenerator/">
|
|
24
|
-
<img src="https://img.shields.io/pypi/dm/swarmauri_tool_qrcodegenerator" alt="PyPI - Downloads"/></a>
|
|
25
|
-
<a href="https://hits.sh/github.com/swarmauri/swarmauri-sdk/tree/master/pkgs/community/swarmauri_tool_qrcodegenerator/">
|
|
26
|
-
<img alt="Hits" src="https://hits.sh/github.com/swarmauri/swarmauri-sdk/tree/master/pkgs/community/swarmauri_tool_qrcodegenerator.svg"/></a>
|
|
27
|
-
<a href="https://pypi.org/project/swarmauri_tool_qrcodegenerator/">
|
|
28
|
-
<img src="https://img.shields.io/pypi/pyversions/swarmauri_tool_qrcodegenerator" alt="PyPI - Python Version"/></a>
|
|
29
|
-
<a href="https://pypi.org/project/swarmauri_tool_qrcodegenerator/">
|
|
30
|
-
<img src="https://img.shields.io/pypi/l/swarmauri_tool_qrcodegenerator" alt="PyPI - License"/></a>
|
|
31
|
-
<a href="https://pypi.org/project/swarmauri_tool_qrcodegenerator/">
|
|
32
|
-
<img src="https://img.shields.io/pypi/v/swarmauri_tool_qrcodegenerator?label=swarmauri_tool_qrcodegenerator&color=green" alt="PyPI - swarmauri_tool_qrcodegenerator"/></a>
|
|
33
|
-
</p>
|
|
34
|
-
|
|
35
|
-
---
|
|
36
|
-
|
|
37
|
-
# Swarmauri Tool Qrcodegenerator
|
|
38
|
-
|
|
39
|
-
A tool component for generating QR codes from input data. The tool creates QR codes and returns them as base64-encoded images.
|
|
40
|
-
|
|
41
|
-
## Installation
|
|
42
|
-
|
|
43
|
-
```bash
|
|
44
|
-
pip install swarmauri_tool_qrcodegenerator
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
## Usage
|
|
48
|
-
|
|
49
|
-
Here's a basic example of how to use the QR Code Generator Tool:
|
|
50
|
-
|
|
51
|
-
```python
|
|
52
|
-
from swarmauri.tools.QrCodeGeneratorTool import QrCodeGeneratorTool
|
|
53
|
-
|
|
54
|
-
# Initialize the tool
|
|
55
|
-
qr_tool = QrCodeGeneratorTool()
|
|
56
|
-
|
|
57
|
-
# Generate a QR code
|
|
58
|
-
result = qr_tool("Hello, world!")
|
|
59
|
-
|
|
60
|
-
# The result contains the QR code as a base64-encoded string
|
|
61
|
-
image_b64 = result['image_b64']
|
|
62
|
-
```
|
|
63
|
-
|
|
64
|
-
## Want to help?
|
|
65
|
-
|
|
66
|
-
If you want to contribute to swarmauri-sdk, read up on our [guidelines for contributing](https://github.com/swarmauri/swarmauri-sdk/blob/master/contributing.md) that will help you get started.
|
|
67
|
-
|
|
68
|
-
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-

|
|
3
|
-
|
|
4
|
-
<p align="center">
|
|
5
|
-
<a href="https://pypi.org/project/swarmauri_tool_qrcodegenerator/">
|
|
6
|
-
<img src="https://img.shields.io/pypi/dm/swarmauri_tool_qrcodegenerator" alt="PyPI - Downloads"/></a>
|
|
7
|
-
<a href="https://hits.sh/github.com/swarmauri/swarmauri-sdk/tree/master/pkgs/community/swarmauri_tool_qrcodegenerator/">
|
|
8
|
-
<img alt="Hits" src="https://hits.sh/github.com/swarmauri/swarmauri-sdk/tree/master/pkgs/community/swarmauri_tool_qrcodegenerator.svg"/></a>
|
|
9
|
-
<a href="https://pypi.org/project/swarmauri_tool_qrcodegenerator/">
|
|
10
|
-
<img src="https://img.shields.io/pypi/pyversions/swarmauri_tool_qrcodegenerator" alt="PyPI - Python Version"/></a>
|
|
11
|
-
<a href="https://pypi.org/project/swarmauri_tool_qrcodegenerator/">
|
|
12
|
-
<img src="https://img.shields.io/pypi/l/swarmauri_tool_qrcodegenerator" alt="PyPI - License"/></a>
|
|
13
|
-
<a href="https://pypi.org/project/swarmauri_tool_qrcodegenerator/">
|
|
14
|
-
<img src="https://img.shields.io/pypi/v/swarmauri_tool_qrcodegenerator?label=swarmauri_tool_qrcodegenerator&color=green" alt="PyPI - swarmauri_tool_qrcodegenerator"/></a>
|
|
15
|
-
</p>
|
|
16
|
-
|
|
17
|
-
---
|
|
18
|
-
|
|
19
|
-
# Swarmauri Tool Qrcodegenerator
|
|
20
|
-
|
|
21
|
-
A tool component for generating QR codes from input data. The tool creates QR codes and returns them as base64-encoded images.
|
|
22
|
-
|
|
23
|
-
## Installation
|
|
24
|
-
|
|
25
|
-
```bash
|
|
26
|
-
pip install swarmauri_tool_qrcodegenerator
|
|
27
|
-
```
|
|
28
|
-
|
|
29
|
-
## Usage
|
|
30
|
-
|
|
31
|
-
Here's a basic example of how to use the QR Code Generator Tool:
|
|
32
|
-
|
|
33
|
-
```python
|
|
34
|
-
from swarmauri.tools.QrCodeGeneratorTool import QrCodeGeneratorTool
|
|
35
|
-
|
|
36
|
-
# Initialize the tool
|
|
37
|
-
qr_tool = QrCodeGeneratorTool()
|
|
38
|
-
|
|
39
|
-
# Generate a QR code
|
|
40
|
-
result = qr_tool("Hello, world!")
|
|
41
|
-
|
|
42
|
-
# The result contains the QR code as a base64-encoded string
|
|
43
|
-
image_b64 = result['image_b64']
|
|
44
|
-
```
|
|
45
|
-
|
|
46
|
-
## Want to help?
|
|
47
|
-
|
|
48
|
-
If you want to contribute to swarmauri-sdk, read up on our [guidelines for contributing](https://github.com/swarmauri/swarmauri-sdk/blob/master/contributing.md) that will help you get started.
|
|
49
|
-
|
{swarmauri_tool_qrcodegenerator-0.9.0.dev4 → swarmauri_tool_qrcodegenerator-0.9.2.dev6}/LICENSE
RENAMED
|
File without changes
|
|
File without changes
|