cycls 0.0.2.103__tar.gz → 0.0.2.104__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 (20) hide show
  1. {cycls-0.0.2.103 → cycls-0.0.2.104}/PKG-INFO +1 -1
  2. {cycls-0.0.2.103 → cycls-0.0.2.104}/cycls/web.py +7 -7
  3. {cycls-0.0.2.103 → cycls-0.0.2.104}/pyproject.toml +1 -1
  4. {cycls-0.0.2.103 → cycls-0.0.2.104}/.gitignore +0 -0
  5. {cycls-0.0.2.103 → cycls-0.0.2.104}/README.md +0 -0
  6. {cycls-0.0.2.103 → cycls-0.0.2.104}/cycls/__init__.py +0 -0
  7. {cycls-0.0.2.103 → cycls-0.0.2.104}/cycls/app.py +0 -0
  8. {cycls-0.0.2.103 → cycls-0.0.2.104}/cycls/auth.py +0 -0
  9. {cycls-0.0.2.103 → cycls-0.0.2.104}/cycls/cli.py +0 -0
  10. {cycls-0.0.2.103 → cycls-0.0.2.104}/cycls/function.py +0 -0
  11. {cycls-0.0.2.103 → cycls-0.0.2.104}/cycls/themes/default/assets/FileSaver.min-BN40akLc.js +0 -0
  12. {cycls-0.0.2.103 → cycls-0.0.2.104}/cycls/themes/default/assets/html2canvas.esm-QH1iLAAe.js +0 -0
  13. {cycls-0.0.2.103 → cycls-0.0.2.104}/cycls/themes/default/assets/index-3AQCbjkB.js +0 -0
  14. {cycls-0.0.2.103 → cycls-0.0.2.104}/cycls/themes/default/assets/index-CjN0qc53.css +0 -0
  15. {cycls-0.0.2.103 → cycls-0.0.2.104}/cycls/themes/default/assets/index-qcHL6SRo.js +0 -0
  16. {cycls-0.0.2.103 → cycls-0.0.2.104}/cycls/themes/default/assets/index.es-BmxgotDY.js +0 -0
  17. {cycls-0.0.2.103 → cycls-0.0.2.104}/cycls/themes/default/assets/jspdf.es.min-CvOy4co6.js +0 -0
  18. {cycls-0.0.2.103 → cycls-0.0.2.104}/cycls/themes/default/assets/purify.es-B9ZVCkUG.js +0 -0
  19. {cycls-0.0.2.103 → cycls-0.0.2.104}/cycls/themes/default/index.html +0 -0
  20. {cycls-0.0.2.103 → cycls-0.0.2.104}/cycls/themes/dev/index.html +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cycls
3
- Version: 0.0.2.103
3
+ Version: 0.0.2.104
4
4
  Summary: Distribute Intelligence
5
5
  Author-email: "Mohammed J. AlRujayi" <mj@cycls.com>
6
6
  Requires-Python: >=3.10
@@ -137,22 +137,22 @@ def web(func, config):
137
137
  async def get_config():
138
138
  return config
139
139
 
140
- @app.post("/files")
141
- async def upload_file(file: UploadFile = File(...), jwt: dict = Depends(validate)):
140
+ @app.post("/attachments")
141
+ async def upload_attachment(file: UploadFile = File(...), jwt: dict = Depends(validate)):
142
142
  user_id = jwt["user"]["id"]
143
- user_dir = Path(f"/workspace/{user_id}/files")
143
+ user_dir = Path(f"/workspace/{user_id}/attachments")
144
144
  user_dir.mkdir(parents=True, exist_ok=True)
145
145
 
146
146
  file_path = user_dir / file.filename
147
147
  with open(file_path, "wb") as f:
148
148
  f.write(await file.read())
149
149
 
150
- return {"url": f"/files/{file.filename}"}
150
+ return {"url": f"/attachments/{file.filename}"}
151
151
 
152
- @app.get("/files/{filename}")
153
- async def get_file(filename: str, jwt: dict = Depends(validate)):
152
+ @app.get("/attachments/{filename}")
153
+ async def get_attachment(filename: str, jwt: dict = Depends(validate)):
154
154
  user_id = jwt["user"]["id"]
155
- file_path = Path(f"/workspace/{user_id}/files") / filename
155
+ file_path = Path(f"/workspace/{user_id}/attachments") / filename
156
156
 
157
157
  if not file_path.exists():
158
158
  raise HTTPException(status_code=404, detail="File not found")
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "cycls"
3
- version = "0.0.2.103"
3
+ version = "0.0.2.104"
4
4
  description = "Distribute Intelligence"
5
5
  authors = [{ name = "Mohammed J. AlRujayi", email = "mj@cycls.com" }]
6
6
  readme = "README.md"
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes