Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

To Update create_repo python script #51

Open
anupammaurya6767 opened this issue May 23, 2023 · 6 comments
Open

To Update create_repo python script #51

anupammaurya6767 opened this issue May 23, 2023 · 6 comments
Assignees
Labels
gssoc23 Issues created for GSSoC 23 contributors level3

Comments

@anupammaurya6767
Copy link

Changes Proposed:

  1. Replace the use of os.system for executing shell commands with the subprocess module, which provides more flexibility and better handling of command execution.
  2. Utilize the requests library instead of the http.client module for making HTTP requests, as it offers a more straightforward and user-friendly interface.
  3. Implement error handling for HTTP requests and responses to provide better feedback in case of failures.
  4. Improve code readability and adherence to PEP 8 style guidelines.
@anupammaurya6767
Copy link
Author

@sahil-sagwekar2652 I am a GSSOC contributor
I want to work on this issue
Please assign it to me

@shubham-deshmukh
Copy link
Contributor

Changes Proposed:

  1. Replace the use of os.system for executing shell commands with the subprocess module, which provides more flexibility and better handling of command execution.
  2. Utilize the requests library instead of the http.client module for making HTTP requests, as it offers a more straightforward and user-friendly interface.
  3. Implement error handling for HTTP requests and responses to provide better feedback in case of failures.
  4. Improve code readability and adherence to PEP 8 style guidelines.

Hi @anupammaurya6767
I would like to discuss this issue just for information and to understand the workflow of the project.
As per my understanding, http.client is used as it is a built-in library whereas the requests module needs to be imported.
I'm thinking what could be the major advantages of using the requests library over the other.

@anupammaurya6767
Copy link
Author

@shubham-deshmukh

  • The requests library is compatible with both Python 2 and Python 3, providing a consistent API across different versions of Python. In contrast, http.client may have some differences and variations in its usage between Python 2 and 3, making it less consistent when working with multiple Python versions.
  • Requests integrates well with other Python libraries and tools, making it convenient to use in conjunction with frameworks like Flask, Django, and testing frameworks like pytest. Many other libraries and tools in the Python ecosystem provide built-in support for requests, further enhancing its capabilities and usability.

http.client is a lower-level module and can offer more control and customization in certain scenarios, the requests library excels in providing a simpler, more intuitive, and feature-rich experience for most common HTTP request use cases.

@shubham-deshmukh
Copy link
Contributor

@anupammaurya6767 Thank you for the detailed explanation.

@sahil-sagwekar2652 sahil-sagwekar2652 added the gssoc23 Issues created for GSSoC 23 contributors label May 27, 2023
@sahil-sagwekar2652
Copy link
Owner

Hey everyone, it's great to see that people are collaborating and helping each other. Keep up the spirit!
I am assigning this issue to @anupammaurya6767 .

@bhavya1857
Copy link

hey, if this issue hasn't been closed, can i work on it then?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
gssoc23 Issues created for GSSoC 23 contributors level3
Projects
None yet
Development

No branches or pull requests

4 participants