From a7c884396760645cd80e90dfc4188f740197ed76 Mon Sep 17 00:00:00 2001 From: Sujan Midatani Date: Sat, 11 May 2024 23:02:34 +0530 Subject: [PATCH 01/10] added API methods to the documentation --- contrib/api-development/api-methods.md | 27 ++++++++++++++++++++++++++ contrib/api-development/index.md | 2 +- 2 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 contrib/api-development/api-methods.md diff --git a/contrib/api-development/api-methods.md b/contrib/api-development/api-methods.md new file mode 100644 index 0000000..8c66919 --- /dev/null +++ b/contrib/api-development/api-methods.md @@ -0,0 +1,27 @@ +## API Methods + +- **GET**: + - The GET method is used to retrieve data from a specified resource. + - It is a safe and idempotent method, meaning that it should not have any side effects and can be called multiple times without changing the result. + - Use the GET method when you want to retrieve information from the server. + +- **POST**: + - The POST method is used to submit data to be processed to a specified resource. + - It is not idempotent, meaning that calling the same POST request multiple times may result in different outcomes. + - Use the POST method when you want to create a new resource on the server. + +- **PUT**: + - The PUT method is used to update a specified resource with new data. + - It is idempotent, meaning that calling the same PUT request multiple times should have the same effect as calling it once. + - Use the PUT method when you want to update an existing resource on the server. + +- **PATCH**: + - The PATCH method is used to apply partial modifications to a resource. + - It is not idempotent, meaning that calling the same PATCH request multiple times may result in different outcomes. + - Use the PATCH method when you want to update a resource with partial data. + +- **DELETE**: + - The DELETE method is used to delete a specified resource. + - It is idempotent, meaning that calling the same DELETE request multiple times should have the same effect as calling it once. + - Use the DELETE method when you want to remove a resource from the server. + diff --git a/contrib/api-development/index.md b/contrib/api-development/index.md index 82596a2..75c702a 100644 --- a/contrib/api-development/index.md +++ b/contrib/api-development/index.md @@ -1,3 +1,3 @@ # List of sections -- [Section title](filename.md) +- [API Methods](api-methods.md) From d4c8ab4d49caa7549ef0ce77c665e72bb768b94f Mon Sep 17 00:00:00 2001 From: Sujan Midatani Date: Sat, 11 May 2024 23:24:31 +0530 Subject: [PATCH 02/10] added additional API methods to the documentation --- contrib/api-development/api-methods.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/contrib/api-development/api-methods.md b/contrib/api-development/api-methods.md index 8c66919..61e10d7 100644 --- a/contrib/api-development/api-methods.md +++ b/contrib/api-development/api-methods.md @@ -25,3 +25,23 @@ - It is idempotent, meaning that calling the same DELETE request multiple times should have the same effect as calling it once. - Use the DELETE method when you want to remove a resource from the server. +- **OPTIONS**: + - The OPTIONS method is used to describe the communication options for the target resource. + - It is idempotent, meaning that calling the same OPTIONS request multiple times should have the same effect as calling it once. + - Use the OPTIONS method when you want to retrieve the communication options for a resource. + +- **HEAD**: + - The HEAD method is similar to the GET method, but it only retrieves the headers of the response without the body. + - It is idempotent, meaning that calling the same HEAD request multiple times should have the same effect as calling it once. + - Use the HEAD method when you want to check the headers of a resource without retrieving the body. + +- **TRACE**: + - The TRACE method is used to test the connectivity between the client and the server. + - It is idempotent, meaning that calling the same TRACE request multiple times should have the same effect as calling it once. + - Use the TRACE method when you want to test the connectivity between the client and the server. + +- **CONNECT**: + - The CONNECT method is used to establish a tunnel to the server using a proxy. + - It is not idempotent, meaning that calling the same CONNECT request multiple times may result in different outcomes. + - Use the CONNECT method when you want to establish a tunnel to the server using a proxy. + From 7ad18bd08e99f448c7671e0bc8c295928e5c62cd Mon Sep 17 00:00:00 2001 From: Sujan Midatani Date: Sat, 11 May 2024 23:59:31 +0530 Subject: [PATCH 03/10] added tabular explaination of API methods to the documentation --- contrib/api-development/api-methods.md | 34 ++++++++++++-------------- 1 file changed, 15 insertions(+), 19 deletions(-) diff --git a/contrib/api-development/api-methods.md b/contrib/api-development/api-methods.md index 61e10d7..8de9184 100644 --- a/contrib/api-development/api-methods.md +++ b/contrib/api-development/api-methods.md @@ -1,47 +1,43 @@ -## API Methods +# API Methods + +| Method | Summary | CRUD | Accepts Request Body | Idempotent | Safe | +|---------|----------------------------------------------------------|--------|-----------------------|------------|------| +| GET | To fetch a single resource or group of resources | Read | No | Yes | Yes | +| PUT | To update an entire resource in one go | Update | Yes | Yes | No | +| POST | To create a new resource | Create | Yes | No | No | +| PATCH | To partially update a resource | Update | Yes | No | No | +| DELETE | To delete a resource | Delete | No | Yes | No | +| OPTIONS | To get information on permitted operations | Read | No | Yes | Yes | +| HEAD | To get metadata of the endpoint | Read | No | Yes | Yes | +| TRACE | For diagnosing purposes | Read | No | Yes | Yes | +| CONNECT | To make the two-way connection between the client and the resource | - | No | No | No | + +## Method Details: - **GET**: - The GET method is used to retrieve data from a specified resource. - - It is a safe and idempotent method, meaning that it should not have any side effects and can be called multiple times without changing the result. - - Use the GET method when you want to retrieve information from the server. - **POST**: - The POST method is used to submit data to be processed to a specified resource. - - It is not idempotent, meaning that calling the same POST request multiple times may result in different outcomes. - - Use the POST method when you want to create a new resource on the server. - **PUT**: - The PUT method is used to update a specified resource with new data. - - It is idempotent, meaning that calling the same PUT request multiple times should have the same effect as calling it once. - - Use the PUT method when you want to update an existing resource on the server. - **PATCH**: - The PATCH method is used to apply partial modifications to a resource. - - It is not idempotent, meaning that calling the same PATCH request multiple times may result in different outcomes. - - Use the PATCH method when you want to update a resource with partial data. - **DELETE**: - The DELETE method is used to delete a specified resource. - - It is idempotent, meaning that calling the same DELETE request multiple times should have the same effect as calling it once. - - Use the DELETE method when you want to remove a resource from the server. - **OPTIONS**: - The OPTIONS method is used to describe the communication options for the target resource. - - It is idempotent, meaning that calling the same OPTIONS request multiple times should have the same effect as calling it once. - - Use the OPTIONS method when you want to retrieve the communication options for a resource. - **HEAD**: - The HEAD method is similar to the GET method, but it only retrieves the headers of the response without the body. - - It is idempotent, meaning that calling the same HEAD request multiple times should have the same effect as calling it once. - - Use the HEAD method when you want to check the headers of a resource without retrieving the body. - **TRACE**: - The TRACE method is used to test the connectivity between the client and the server. - - It is idempotent, meaning that calling the same TRACE request multiple times should have the same effect as calling it once. - - Use the TRACE method when you want to test the connectivity between the client and the server. - **CONNECT**: - The CONNECT method is used to establish a tunnel to the server using a proxy. - - It is not idempotent, meaning that calling the same CONNECT request multiple times may result in different outcomes. - - Use the CONNECT method when you want to establish a tunnel to the server using a proxy. From 2a3d288a72edb7b6a87ed32da0b7c1256eff8ea4 Mon Sep 17 00:00:00 2001 From: Sujan Midatani Date: Sun, 12 May 2024 00:10:48 +0530 Subject: [PATCH 04/10] added extra details to the table for explaination of API methods to the documentation --- contrib/api-development/api-methods.md | 41 +++++++++++++------------- 1 file changed, 20 insertions(+), 21 deletions(-) diff --git a/contrib/api-development/api-methods.md b/contrib/api-development/api-methods.md index 8de9184..de3228a 100644 --- a/contrib/api-development/api-methods.md +++ b/contrib/api-development/api-methods.md @@ -1,43 +1,42 @@ # API Methods -| Method | Summary | CRUD | Accepts Request Body | Idempotent | Safe | -|---------|----------------------------------------------------------|--------|-----------------------|------------|------| -| GET | To fetch a single resource or group of resources | Read | No | Yes | Yes | -| PUT | To update an entire resource in one go | Update | Yes | Yes | No | -| POST | To create a new resource | Create | Yes | No | No | -| PATCH | To partially update a resource | Update | Yes | No | No | -| DELETE | To delete a resource | Delete | No | Yes | No | -| OPTIONS | To get information on permitted operations | Read | No | Yes | Yes | -| HEAD | To get metadata of the endpoint | Read | No | Yes | Yes | -| TRACE | For diagnosing purposes | Read | No | Yes | Yes | -| CONNECT | To make the two-way connection between the client and the resource | - | No | No | No | +| Method | Summary | CRUD | Accepts Request Body | Idempotent | Safe | Response Body | +|---------|----------------------------------------------------------|--------|-----------------------|------------|------|---------------| +| GET | To fetch a single resource or group of resources | Read | No | Yes | Yes | Yes | +| PUT | To update an entire resource in one go | Update | Yes | Yes | No | Yes | +| POST | To create a new resource | Create | Yes | No | No | Yes | +| PATCH | To partially update a resource | Update | Yes | No | No | Yes | +| DELETE | To delete a resource | Delete | No | Yes | No | No | +| OPTIONS | To get information on permitted operations | Read | No | Yes | Yes | Yes | +| HEAD | To get metadata of the endpoint | Read | No | Yes | Yes | No | +| TRACE | For diagnosing purposes | Read | No | Yes | Yes | No | +| CONNECT | To make the two-way connection between the client and the resource | - | No | No | No | No | ## Method Details: - **GET**: - - The GET method is used to retrieve data from a specified resource. + - The GET method is used to retrieve data from a specified resource. It does not typically alter the state of the resource and is safe and idempotent. It can accept query parameters in the URL to filter or sort the results. A response body is returned with the requested data. - **POST**: - - The POST method is used to submit data to be processed to a specified resource. + - The POST method is used to submit data to be processed to a specified resource. It is commonly used for creating new resources, and it may or may not require a request body containing the data to be created. It is not idempotent nor safe. A response body is returned with the newly created resource's details. - **PUT**: - - The PUT method is used to update a specified resource with new data. + - The PUT method is used to update a specified resource with new data. It typically requires a request body containing the complete representation of the resource to be updated. It is idempotent and not safe. A response body is returned with the updated resource's details. - **PATCH**: - - The PATCH method is used to apply partial modifications to a resource. + - The PATCH method is used to apply partial modifications to a resource. It typically requires a request body containing the specific changes to be made. It is not idempotent nor safe. A response body is returned with the updated resource's details. - **DELETE**: - - The DELETE method is used to delete a specified resource. + - The DELETE method is used to delete a specified resource. It does not typically require a request body, as the resource to be deleted is identified in the request URI. It is idempotent but not safe. No response body is returned. - **OPTIONS**: - - The OPTIONS method is used to describe the communication options for the target resource. + - The OPTIONS method is used to describe the communication options for the target resource. It does not typically require a request body and is safe and idempotent. A response body is returned with information about the supported HTTP methods and other metadata. - **HEAD**: - - The HEAD method is similar to the GET method, but it only retrieves the headers of the response without the body. + - The HEAD method is similar to the GET method, but it only retrieves the headers of the response without the body. It does not typically require a request body and is safe and idempotent. - **TRACE**: - - The TRACE method is used to test the connectivity between the client and the server. + - The TRACE method is used to test the connectivity between the client and the server. It does not typically require a request body and is safe and idempotent. - **CONNECT**: - - The CONNECT method is used to establish a tunnel to the server using a proxy. - + - The CONNECT method is used to establish a tunnel to the server using a proxy. It does not typically require a request body and is neither safe nor idempotent. From 237a00cdbfaab63481a5390fb92a2040ccc95fdd Mon Sep 17 00:00:00 2001 From: Sujan Midatani Date: Sun, 12 May 2024 00:19:57 +0530 Subject: [PATCH 05/10] added DEFINITIONS FOR ATTRIBUTES of API methods to the documentation --- contrib/api-development/api-methods.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/contrib/api-development/api-methods.md b/contrib/api-development/api-methods.md index de3228a..ea41979 100644 --- a/contrib/api-development/api-methods.md +++ b/contrib/api-development/api-methods.md @@ -40,3 +40,17 @@ - **CONNECT**: - The CONNECT method is used to establish a tunnel to the server using a proxy. It does not typically require a request body and is neither safe nor idempotent. + +### Definitions: + +- **CRUD**: + - CRUD stands for Create, Read, Update, and Delete, representing the four basic functions of persistent storage. These operations are commonly used in database and RESTful API designs. + +- **Accepts Request Body**: + - Indicates whether the HTTP method typically accepts a request body containing data to be processed or modified. If yes, the method may require the client to include data in the request body. + +- **Idempotent**: + - An idempotent operation means that making the same request multiple times will produce the same result as making it once. In the context of HTTP methods, an idempotent method does not change the server state after multiple identical requests. + +- **Safe**: + - A safe operation does not modify the state of the server or its resources. It only retrieves data without causing any side effects. Safe methods are typically used for read-only operations. \ No newline at end of file From dae21c7f6368bf35849be297e3bd45b2cd5a80eb Mon Sep 17 00:00:00 2001 From: Adarsh Amit Date: Sun, 12 May 2024 03:24:09 +0530 Subject: [PATCH 06/10] Added matplotlib_installation.md file and updated the index.md --- contrib/plotting-visualization/index.md | 2 +- .../matplotlib_installation.md | 25 +++++++++++++++++++ 2 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 contrib/plotting-visualization/matplotlib_installation.md diff --git a/contrib/plotting-visualization/index.md b/contrib/plotting-visualization/index.md index 82596a2..67bee6d 100644 --- a/contrib/plotting-visualization/index.md +++ b/contrib/plotting-visualization/index.md @@ -1,3 +1,3 @@ # List of sections -- [Section title](filename.md) +- [Installing Matplotlib](matplotlib_installation.md) diff --git a/contrib/plotting-visualization/matplotlib_installation.md b/contrib/plotting-visualization/matplotlib_installation.md new file mode 100644 index 0000000..e5c21ea --- /dev/null +++ b/contrib/plotting-visualization/matplotlib_installation.md @@ -0,0 +1,25 @@ +# Matplotlib Installation + +Matplotlib is a widely used Python library for creating static, animated, and interactive visualizations. It can be installed using `pip`, Python's package manager. + +## Prerequisites + +Before installing Matplotlib, ensure you have Python installed on your system. You can download and install Python from the [official Python website](https://www.python.org/). + +## Installation Steps + +1. **Install Matplotlib**: Open your terminal or command prompt and run the following command to install Matplotlib using `pip`: + +```bash +pip install matplotlib +``` + +2. **Verify Installation**: After installation, you can verify if Matplotlib is installed correctly by importing it in a Python environment: + +```python +import matplotlib + +print(matplotlib.__version__) + + +``` From f7caaca6803f43f863184ff17ea1e385d2a2c459 Mon Sep 17 00:00:00 2001 From: petergriffin29 <116427452+evilsaint000@users.noreply.github.com> Date: Sun, 12 May 2024 12:30:35 +0530 Subject: [PATCH 07/10] Update README.md First python release was 0.9.0 --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index e00bbc4..e653892 100644 --- a/README.md +++ b/README.md @@ -225,7 +225,7 @@ Some of the popular languages are Java, C, C++, C#, Go, Swift, JavaScript, PHP, ## Introduction to Python -Guido van Rossum started the development of Python in December 1989. He released the first version (0.9.9) of Python for general public on February 20, 1991. +Guido van Rossum started the development of Python in December 1989. He released the first version (0.9.0) of Python for general public on February 20, 1991. The language evolved over the next few decades and so did its definition, the current version of which is stated below: From 8f5cebaea0680155455094f3a963c39c846fa27f Mon Sep 17 00:00:00 2001 From: Adarsh Amit Date: Sun, 12 May 2024 19:28:04 +0530 Subject: [PATCH 08/10] added the output of the verify installation --- contrib/plotting-visualization/matplotlib_installation.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/contrib/plotting-visualization/matplotlib_installation.md b/contrib/plotting-visualization/matplotlib_installation.md index e5c21ea..263e99b 100644 --- a/contrib/plotting-visualization/matplotlib_installation.md +++ b/contrib/plotting-visualization/matplotlib_installation.md @@ -23,3 +23,9 @@ print(matplotlib.__version__) ``` + +Output: + +``` +3.4.3 +``` From 079cbf43d9584d3869ec467e1d3b2f9f8c3e8b98 Mon Sep 17 00:00:00 2001 From: Ankit Mahato Date: Mon, 13 May 2024 00:21:04 +0530 Subject: [PATCH 09/10] Create CODE_OF_CONDUCT.md --- CODE_OF_CONDUCT.md | 127 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 127 insertions(+) create mode 100644 CODE_OF_CONDUCT.md diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 0000000..41dd9eb --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,127 @@ +# Contributor Covenant Code of Conduct + +## Our Pledge + +We as members, contributors, and leaders pledge to make participation in our +community a harassment-free experience for everyone, regardless of age, body +size, visible or invisible disability, ethnicity, sex characteristics, gender +identity and expression, level of experience, education, socio-economic status, +nationality, personal appearance, race, religion, or sexual identity +and orientation. + +We pledge to act and interact in ways that contribute to an open, welcoming, +diverse, inclusive, and healthy community. + +## Our Standards + +Examples of behavior that contributes to a positive environment for our +community include: + +* Demonstrating empathy and kindness toward other people +* Being respectful of differing opinions, viewpoints, and experiences +* Giving and gracefully accepting constructive feedback +* Accepting responsibility and apologizing to those affected by our mistakes, + and learning from the experience +* Focusing on what is best not just for us as individuals, but for the + overall community + +Examples of unacceptable behavior include: + +* The use of sexualized language or imagery, and sexual attention or + advances of any kind +* Trolling, insulting or derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or email + address, without their explicit permission +* Other conduct which could reasonably be considered inappropriate in a + professional setting + +## Enforcement Responsibilities + +Community leaders are responsible for clarifying and enforcing our standards of +acceptable behavior and will take appropriate and fair corrective action in +response to any behavior that they deem inappropriate, threatening, offensive, +or harmful. + +Community leaders have the right and responsibility to remove, edit, or reject +comments, commits, code, wiki edits, issues, and other contributions that are +not aligned to this Code of Conduct, and will communicate reasons for moderation +decisions when appropriate. + +## Scope + +This Code of Conduct applies within all community spaces, and also applies when +an individual is officially representing the community in public spaces. +Examples of representing our community include using an official e-mail address, +posting via an official social media account, or acting as an appointed +representative at an online or offline event. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be +reported to the community leaders responsible for enforcement. +All complaints will be reviewed and investigated promptly and fairly. + +All community leaders are obligated to respect the privacy and security of the +reporter of any incident. + +## Enforcement Guidelines + +Community leaders will follow these Community Impact Guidelines in determining +the consequences for any action they deem in violation of this Code of Conduct: + +### 1. Correction + +**Community Impact**: Use of inappropriate language or other behavior deemed +unprofessional or unwelcome in the community. + +**Consequence**: A private, written warning from community leaders, providing +clarity around the nature of the violation and an explanation of why the +behavior was inappropriate. A public apology may be requested. + +### 2. Warning + +**Community Impact**: A violation through a single incident or series +of actions. + +**Consequence**: A warning with consequences for continued behavior. No +interaction with the people involved, including unsolicited interaction with +those enforcing the Code of Conduct, for a specified period of time. This +includes avoiding interactions in community spaces as well as external channels +like social media. Violating these terms may lead to a temporary or +permanent ban. + +### 3. Temporary Ban + +**Community Impact**: A serious violation of community standards, including +sustained inappropriate behavior. + +**Consequence**: A temporary ban from any sort of interaction or public +communication with the community for a specified period of time. No public or +private interaction with the people involved, including unsolicited interaction +with those enforcing the Code of Conduct, is allowed during this period. +Violating these terms may lead to a permanent ban. + +### 4. Permanent Ban + +**Community Impact**: Demonstrating a pattern of violation of community +standards, including sustained inappropriate behavior, harassment of an +individual, or aggression toward or disparagement of classes of individuals. + +**Consequence**: A permanent ban from any sort of public interaction within +the community. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], +version 2.0, available at +https://www.contributor-covenant.org/version/2/0/code_of_conduct.html. + +Community Impact Guidelines were inspired by [Mozilla's code of conduct +enforcement ladder](https://github.com/mozilla/diversity). + +[homepage]: https://www.contributor-covenant.org + +For answers to common questions about this code of conduct, see the FAQ at +https://www.contributor-covenant.org/faq. Translations are available at +https://www.contributor-covenant.org/translations. From bf7fd3c40f8ef94f33afc8eb04ee91d364c1f68a Mon Sep 17 00:00:00 2001 From: Ankit Mahato Date: Mon, 13 May 2024 00:21:54 +0530 Subject: [PATCH 10/10] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index e00bbc4..2590367 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ [![Discord Server Invite](https://img.shields.io/badge/DISCORD-JOIN%20SERVER-5663F7?style=for-the-badge&logo=discord&logoColor=white)](https://bit.ly/heyfoss) -This project is an participating in GSSoC 2024. +This project is participating in GSSoC 2024. ![gssoc-logo](https://github.com/foss42/awesome-generative-ai-apis/assets/1382619/670b651a-15d7-4869-a4d1-6613df09fa37)