cycls 0.0.2.23__py3-none-any.whl → 0.0.2.24__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.
cycls/cycls.py CHANGED
@@ -32,6 +32,7 @@ def find_available_port(start_port):
32
32
  port += 1
33
33
 
34
34
  import asyncssh, asyncio
35
+ # ssh -q -i tuns -o StrictHostKeyChecking=no -R 80:localhost:9000 tuns.sh
35
36
  async def create_ssh_tunnel(x,y,z='tuns.sh'):
36
37
  try:
37
38
  async with asyncssh.connect(z,client_keys=[key_path],known_hosts=None) as conn:
@@ -94,7 +95,8 @@ class Cycls:
94
95
  def push(self):
95
96
  O("port",self.port)
96
97
  if self.url=="":
97
- self.url = f"https://{self.subdomain}-cycls.tuns.sh"
98
+ # self.url = f"https://{self.subdomain}-cycls.tuns.sh"
99
+ self.url = f"https://cycls-{self.subdomain}.tuns.sh"
98
100
  mode = "dev"
99
101
  else:
100
102
  mode = "prod"
@@ -103,7 +105,8 @@ class Cycls:
103
105
  self.server.post("/gateway")(self.gateway)
104
106
  @self.server.on_event("startup")
105
107
  def startup_event():
106
- asyncio.create_task(create_ssh_tunnel(f"{self.subdomain}-cycls", self.port))
108
+ # asyncio.create_task(create_ssh_tunnel(f"{self.subdomain}-cycls", self.port))
109
+ asyncio.create_task(create_ssh_tunnel(f"{self.subdomain}", self.port))
107
110
  try:
108
111
  uvicorn.run(self.server, host="127.0.0.1", port=self.port, log_level="error")
109
112
  except KeyboardInterrupt:
@@ -0,0 +1,102 @@
1
+ Metadata-Version: 2.1
2
+ Name: cycls
3
+ Version: 0.0.2.24
4
+ Summary: Cycls SDK
5
+ Author: Mohammed Jamal
6
+ Author-email: mj@cycls.com
7
+ Requires-Python: >=3.8,<4.0
8
+ Classifier: Programming Language :: Python :: 3
9
+ Classifier: Programming Language :: Python :: 3.8
10
+ Classifier: Programming Language :: Python :: 3.9
11
+ Classifier: Programming Language :: Python :: 3.10
12
+ Classifier: Programming Language :: Python :: 3.11
13
+ Classifier: Programming Language :: Python :: 3.12
14
+ Requires-Dist: asyncssh (>=2.14.2,<3.0.0)
15
+ Requires-Dist: fastapi (>=0.111.0,<0.112.0)
16
+ Requires-Dist: httpx (>=0.27.0,<0.28.0)
17
+ Description-Content-Type: text/markdown
18
+
19
+ <p align="center">
20
+ <img src="https://github.com/user-attachments/assets/96bd304d-8116-4bce-8b8f-b08980875ad7" width="800px" alt="Cycls Banner">
21
+ </p>
22
+
23
+ <h3 align="center">
24
+ Generate live apps from code in minutes with built-in memory, <br/>rich hypermedia content, and cross-platform support
25
+ </h3>
26
+
27
+ <h4 align="center">
28
+ <a href="https://cycls.com">Website</a> |
29
+ <a href="https://docs.cycls.com">Docs</a> |
30
+ <a href="https://docs.cycls.com">Blog</a>
31
+ </h4>
32
+
33
+ <h4 align="center">
34
+ <a href="https://pypi.python.org/pypi/cycls"><img src="https://img.shields.io/pypi/v/cycls.svg?label=cycls+pypi&color=blueviolet" alt="cycls Python package on PyPi" /></a>
35
+ <a href="https://blog.cycls.com"><img src="https://img.shields.io/badge/newsletter-blueviolet.svg?logo=substack&label=cycls" alt="Cycls newsletter" /></a>
36
+ <a href="https://x.com/cycls_">
37
+ <img src="https://img.shields.io/twitter/follow/cycls_" alt="Cycls Twitter" />
38
+ </a>
39
+ </h4>
40
+
41
+
42
+ ## Cycls: The AI App Generator
43
+ Cycls[^1] streamlines AI application development by generating apps from high-level descriptions. It eliminates boilerplate, ensures cross-platform compatibility, and manages memory - all from a single codebase.
44
+
45
+ With Cycls, you can quickly prototype ideas and then turn them into production apps, while focusing on AI logic and user interactions rather than wrestling with implementation details.
46
+
47
+ ## ✨ Core Features
48
+ - **Fast App Generation**: Create live web apps from code in minutes
49
+ - **Built-in Memory Management**: Integrated state and session management
50
+ - **Rich Hypermedia Content**: Support for various media types (text, images, audio, video, interactive elements)
51
+ - **Framework Agnostic**: Compatible with a wide range of AI frameworks and models
52
+
53
+ ## 🚀 Quickstart
54
+ ### Installation
55
+ ```
56
+ pip install cycls
57
+ ```
58
+
59
+ ### Basic usage
60
+ ```py
61
+ from cycls import Cycls
62
+
63
+ cycls = Cycls()
64
+
65
+ @cycls("@my-app")
66
+ def app():
67
+ return "Hello World!"
68
+
69
+ cycls.push()
70
+ ```
71
+ This creates an app named "@my-app" that responds with "Hello World!".
72
+
73
+ The `@cycls("@my-app")` decorator registers your app, and `cycls.push()` streams it to Cycls platform.
74
+
75
+ To see a live example, visit https://cycls.com/@spark.
76
+
77
+ > [!IMPORTANT]
78
+ > Use a unique name for your app (like "@my-app"). This is your app's identifier on Cycls.
79
+
80
+ > [!NOTE]
81
+ > Your apps run on your infrastructure and are streamed in real-time to Cycls.
82
+
83
+ ## 📖 Documentation
84
+ For more detailes and instructions, visit our documentation at [docs.cycls.com](https://docs.cycls.com/).
85
+
86
+ ## 🗺️ Roadmap
87
+ - **iOS and Android apps**
88
+ - **User management**
89
+ - **JavaScript SDK**
90
+ - **Public API**
91
+ - **Cross-app communication**
92
+
93
+ ## 🙌 Support
94
+ Join our Discord community for support and discussions. You can reach us on:
95
+
96
+ - [Join our Discord](https://discord.gg/XbxcTFBf7J)
97
+ - [Join our newsletter](https://blog.cycls.com)
98
+ - [Follow us on Twitter](https://x.com/cycls_)
99
+ - [Email us](mailto:hi@cycls.com)
100
+
101
+ [^1]: The name "Cycls" is a play on "cycles," referring to the continuous exchange between AI prompts (generators) and their responses (generated).
102
+
@@ -0,0 +1,6 @@
1
+ cycls/__init__.py,sha256=HPPQikt_Trbc4s8XyEOeOjB_JRWXlXIkJuh762nUM_g,24
2
+ cycls/cycls.py,sha256=_vCiIUeyDJhC3ANSh5aOSkHw38-k8cuwuYCCmx_yOEg,4731
3
+ cycls/tuns,sha256=CT8olxDKOM0cY6r_bbSGtnWyEmEYFVDVHj9ug3gbYHk,1843
4
+ cycls-0.0.2.24.dist-info/METADATA,sha256=UsbfVWCgu2-uk_3R4tGui1GxP2Q3WstfSNumcWVezHM,3672
5
+ cycls-0.0.2.24.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
6
+ cycls-0.0.2.24.dist-info/RECORD,,
@@ -1,94 +0,0 @@
1
- Metadata-Version: 2.1
2
- Name: cycls
3
- Version: 0.0.2.23
4
- Summary: Cycls SDK
5
- Author: Mohammed Jamal
6
- Author-email: mj@cycls.com
7
- Requires-Python: >=3.8,<4.0
8
- Classifier: Programming Language :: Python :: 3
9
- Classifier: Programming Language :: Python :: 3.8
10
- Classifier: Programming Language :: Python :: 3.9
11
- Classifier: Programming Language :: Python :: 3.10
12
- Classifier: Programming Language :: Python :: 3.11
13
- Classifier: Programming Language :: Python :: 3.12
14
- Requires-Dist: asyncssh (>=2.14.2,<3.0.0)
15
- Requires-Dist: fastapi (>=0.111.0,<0.112.0)
16
- Requires-Dist: httpx (>=0.27.0,<0.28.0)
17
- Description-Content-Type: text/markdown
18
-
19
- </br></br>
20
- <p align="center">
21
- <picture>
22
- <source media="(prefers-color-scheme: dark)" srcset="https://cycls.com/static/assets/logo-gold.svg">
23
- <source media="(prefers-color-scheme: light)" srcset="https://cycls.com/static/assets/logo.svg">
24
- <img alt="Cycls" src="https://cycls.com/static/assets/logo.svg" width="150">
25
- </picture>
26
- </p>
27
- </br></br>
28
-
29
- <div align="center">
30
- <a href="https://pypi.org/project/cycls/" target="_blank" rel="noopener noreferrer">
31
- <img loading="lazy" src="https://img.shields.io/pypi/v/cycls.svg" alt="PyPI" class="img_ev3q" style="display: inline;">
32
- </a>
33
- <a href="https://discord.gg/BMnaMatDC7" target="_blank" rel="noopener noreferrer">
34
- <img loading="lazy" src="https://img.shields.io/discord/1175782747164389466" alt="Discord" class="img_ev3q" style="display: inline;">
35
- </a>
36
- </div>
37
-
38
- </br>
39
-
40
- ```sh
41
- pip install cycls
42
- ```
43
-
44
- # Apps ✦
45
- Instantly publish and share AI apps
46
-
47
- ```py
48
- from cycls import Cycls
49
-
50
- cycls = Cycls()
51
-
52
- @cycls("@spark") # pick a unique handle name
53
- def app(x):
54
- return x.content + "from spark"
55
-
56
- cycls.push()
57
- ```
58
- `cycls.push()` will then publish the app `@spark-dev` on [cycls.com/@spark-dev](https://cycls.com/@spark-dev) in development mode. Make sure to pick a unique app name; Cycls maintains a global namespace for handles.
59
- ## Async Apps
60
- For performance, make the function asynchronous. The following is an async app with message `history` and session `id`
61
- ```py
62
- from cycls import Cycls
63
-
64
- cycls = Cycls()
65
-
66
- @cycls("@spark")
67
- async def app(x):
68
- print(x.history, x.id)
69
- return x.content + "from spark"
70
-
71
- cycls.push()
72
- ```
73
-
74
- # Agents ✧
75
- Call any public app as an agent, see [explore](https://explore.cycls.com)
76
- ```py
77
- from cycls import Cycls
78
-
79
- cycls = Cycls()
80
-
81
- @cycls("@spark")
82
- async def app(x):
83
- return cycls.call("@groq",
84
- x.content)
85
-
86
- cycls.push()
87
- ```
88
-
89
- ### Try it live
90
- - [cycls.com/@groq](https://cycls.com/@groq) | [groq.py](https://github.com/Cycls/examples/blob/main/groq.py)
91
- - [cycls.com/@openai](https://cycls.com/@openai) | [openai.py](https://github.com/Cycls/examples/blob/main/openai.py)
92
- - [cycls.com/@anthropic](https://cycls.com/@anthropic) | [anthropic.py](https://github.com/Cycls/examples/blob/main/anthropic.py)
93
- - [cycls.com/@gemini](https://cycls.com/@gemini) | [gemini.py](https://github.com/Cycls/examples/blob/main/gemini.py)
94
-
@@ -1,6 +0,0 @@
1
- cycls/__init__.py,sha256=HPPQikt_Trbc4s8XyEOeOjB_JRWXlXIkJuh762nUM_g,24
2
- cycls/cycls.py,sha256=G0uFX8TOBvcturvY5pZhfIEn3lo4qt6Ml8Wtjnhx63E,4501
3
- cycls/tuns,sha256=CT8olxDKOM0cY6r_bbSGtnWyEmEYFVDVHj9ug3gbYHk,1843
4
- cycls-0.0.2.23.dist-info/METADATA,sha256=MTlhFvV_D4L7Y4dsTyFU8mslQ-30UD4fZNc1hLIqG30,3009
5
- cycls-0.0.2.23.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
6
- cycls-0.0.2.23.dist-info/RECORD,,