chiragn888 / Decentralized-Network-for-Cloud-Storage-

A decentralized Cloud Network is a model that has all features of the Cloud, it provides Dual Layer of Security and due to distributed file storage, it becomes nearly impossible to hack into the data. The data is divided into multiple slices, the slices are individually encrypted and then sent to the service decentralised cloud. Each encrypted part is stored on a random server, this provides high security. To decrypt the data, the user has to provide the private key which was generated at client-side encryption.
Apache License 2.0
0 stars 0 forks source link

Sweep: Add the fast api #3

Open chiragn888 opened 6 months ago

chiragn888 commented 6 months ago

create a fast api for the two files in the repository so that they can be used only through the api

Checklist - [X] Create `api/main.py` ✓ https://github.com/chiragn888/Decentralized-Network-for-Cloud-Storage-/commit/f82b02a283b7f16fd81797bc7df10093cb37971b [Edit](https://github.com/chiragn888/Decentralized-Network-for-Cloud-Storage-/edit/sweep/add_the_fast_api/api/main.py) - [X] Running GitHub Actions for `api/main.py` ✓ [Edit](https://github.com/chiragn888/Decentralized-Network-for-Cloud-Storage-/edit/sweep/add_the_fast_api/api/main.py) - [X] Create `requirements.txt` ✓ https://github.com/chiragn888/Decentralized-Network-for-Cloud-Storage-/commit/a8107f52f2430451bb0a8da6e837b384c2f24af2 [Edit](https://github.com/chiragn888/Decentralized-Network-for-Cloud-Storage-/edit/sweep/add_the_fast_api/requirements.txt) - [X] Running GitHub Actions for `requirements.txt` ✓ [Edit](https://github.com/chiragn888/Decentralized-Network-for-Cloud-Storage-/edit/sweep/add_the_fast_api/requirements.txt) - [X] Modify `README.md` ✓ https://github.com/chiragn888/Decentralized-Network-for-Cloud-Storage-/commit/d3526eab1c574647c00564cdcf60e835e40b6dab [Edit](https://github.com/chiragn888/Decentralized-Network-for-Cloud-Storage-/edit/sweep/add_the_fast_api/README.md) - [X] Running GitHub Actions for `README.md` ✓ [Edit](https://github.com/chiragn888/Decentralized-Network-for-Cloud-Storage-/edit/sweep/add_the_fast_api/README.md)
sweep-ai[bot] commented 6 months ago

🚀 Here's the PR! #5

See Sweep's progress at the progress dashboard!
Sweep Basic Tier: I'm using GPT-4. You have 5 GPT-4 tickets left for the month and 3 for the day. (tracking ID: 46082bee9f)

For more GPT-4 tickets, visit our payment portal. For a one week free trial, try Sweep Pro (unlimited GPT-4 tickets).
Install Sweep Configs: Pull Request

[!TIP] I can email you next time I complete a pull request if you set up your email here!


Actions (click)

GitHub Actions✓

Here are the GitHub Actions logs prior to making any changes:

Sandbox logs for 22512ee
Checking README.md for syntax errors... ✅ README.md has no syntax errors! 1/1 ✓
Checking README.md for syntax errors...
✅ README.md has no syntax errors!

Sandbox passed on the latest main, so sandbox checks will be enabled for this issue.


Step 1: 🔎 Searching

I found the following snippets in your repository. I will now analyze these snippets and come up with a plan.

Some code snippets I think are relevant in decreasing order of relevance (click to expand). If some file is missing from here, you can mention the path in the ticket description. https://github.com/chiragn888/Decentralized-Network-for-Cloud-Storage-/blob/22512ee583d0dda078566d333e64cdc0d70e8d28/LICENSE#L180-L195 https://github.com/chiragn888/Decentralized-Network-for-Cloud-Storage-/blob/22512ee583d0dda078566d333e64cdc0d70e8d28/LICENSE#L105-L120 https://github.com/chiragn888/Decentralized-Network-for-Cloud-Storage-/blob/22512ee583d0dda078566d333e64cdc0d70e8d28/LICENSE#L120-L135 https://github.com/chiragn888/Decentralized-Network-for-Cloud-Storage-/blob/22512ee583d0dda078566d333e64cdc0d70e8d28/README.md#L1-L15 https://github.com/chiragn888/Decentralized-Network-for-Cloud-Storage-/blob/22512ee583d0dda078566d333e64cdc0d70e8d28/LICENSE#L90-L105 https://github.com/chiragn888/Decentralized-Network-for-Cloud-Storage-/blob/22512ee583d0dda078566d333e64cdc0d70e8d28/LICENSE#L45-L60 https://github.com/chiragn888/Decentralized-Network-for-Cloud-Storage-/blob/22512ee583d0dda078566d333e64cdc0d70e8d28/LICENSE#L30-L45

Step 2: ⌨️ Coding

Ran GitHub Actions for f82b02a283b7f16fd81797bc7df10093cb37971b:

Ran GitHub Actions for a8107f52f2430451bb0a8da6e837b384c2f24af2:

--- 
+++ 
@@ -23,7 +23,27 @@
   
 

+## Setting up and running the FastAPI server
+
+To start using the FastAPI server, you need first to install the necessary dependencies.
+
+1. Install the dependencies from `requirements.txt`:
+
+```bash
+pip install -r requirements.txt
+```
+
+2. Run the FastAPI server with uvicorn:
+
+```bash
+uvicorn api.main:app --reload
+```
+
+This will start the server, which allows you to interact with the provided API endpoints.
+
+

+

Ran GitHub Actions for d3526eab1c574647c00564cdcf60e835e40b6dab:


Step 3: 🔁 Code Review

I have finished reviewing the code for completeness. I did not find errors for sweep/add_the_fast_api.


🎉 Latest improvements to Sweep:
  • New dashboard launched for real-time tracking of Sweep issues, covering all stages from search to coding.
  • Integration of OpenAI's latest Assistant API for more efficient and reliable code planning and editing, improving speed by 3x.
  • Use the GitHub issues extension for creating Sweep issues directly from your editor.

💡 To recreate the pull request edit the issue title or description. To tweak the pull request, leave a comment on the pull request.Something wrong? Let us know.

This is an automated message generated by Sweep AI.

chiragn888 commented 6 months ago

Sweep: add the fast api to server1.py and server2.py