<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Hasan Faraz Khan</title>
    <description>The latest articles on DEV Community by Hasan Faraz Khan (@farazkhanfk7).</description>
    <link>https://dev.to/farazkhanfk7</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F557914%2F63ffcf92-23b3-4073-97aa-95df8428df39.jpeg</url>
      <title>DEV Community: Hasan Faraz Khan</title>
      <link>https://dev.to/farazkhanfk7</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/farazkhanfk7"/>
    <language>en</language>
    <item>
      <title>Understanding WSGI and building a simple web server in Python</title>
      <dc:creator>Hasan Faraz Khan</dc:creator>
      <pubDate>Wed, 23 Jul 2025 08:14:41 +0000</pubDate>
      <link>https://dev.to/farazkhanfk7/understanding-wsgi-and-building-a-simple-web-server-in-python-2258</link>
      <guid>https://dev.to/farazkhanfk7/understanding-wsgi-and-building-a-simple-web-server-in-python-2258</guid>
      <description>&lt;h2&gt;
  
  
  What is WSGI ?
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9j2yb6sprj3r8geqxyj7.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9j2yb6sprj3r8geqxyj7.jpeg" alt="captionless image" width="800" height="221"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you’ve ever worked with Flask or Django, you’ve already worked with WSGI whether you knew it or not. But what is WSGI? And how does it drive Python web frameworks?&lt;/p&gt;

&lt;p&gt;In this article, I’ll explain WSGI, why it’s needed, and demonstrate how to create your own WSGI-driven web server entirely from scratch with just Python’s standard library.&lt;/p&gt;

&lt;h2&gt;
  
  
  WSGI App Interface
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;def application(environ, start_response):
    ...
    return [b'response body']
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;  environ: a dictionary with HTTP request info (method, path, headers, etc.)&lt;/li&gt;
&lt;li&gt;  start_response(status, headers): tells the server what the response looks like&lt;/li&gt;
&lt;li&gt;  Return value: an iterable (usually a list of bytes) containing the response body&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Step-by-step flow:
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt; Client opens &lt;a href="http://localhost:8000/hello" rel="noopener noreferrer"&gt;http://localhost:8000/hello&lt;/a&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;  Your browser sends a GET &lt;code&gt;/hello&lt;/code&gt; HTTP request to port 8000.&lt;/li&gt;
&lt;li&gt;  WSGI Server Receives It&lt;/li&gt;
&lt;li&gt;  Python’s WSGI server (like &lt;code&gt;wsgiref.simple_server&lt;/code&gt;) accepts the TCP connection.&lt;/li&gt;
&lt;li&gt;  Server Calls &lt;code&gt;application(environ, start_response)&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;  It creates the environ dict and provides a &lt;code&gt;start_response&lt;/code&gt; callback.&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;environ includes:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{
 'REQUEST_METHOD': 'GET',
 'PATH_INFO': '/hello',
 'QUERY_STRING': '',
 …
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;Your WSGI App Processes It.&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;  You inspect the path, method, etc and prepare a response.&lt;/li&gt;
&lt;li&gt;  You call :
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;start_response('200 OK', [('Content-Type', 'application/json')])
return [b'{"message": "hello"}']
WSGI Server Converts It to an HTTP Response
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;WSGI Server Converts It to an HTTP Response&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;  It sends the response to the client:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;HTTP/1.1 200 OK
Content-Type: application/json
{"message": "hello"}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Your browser shows {“message”: “hello”} on screen.&lt;/p&gt;

&lt;h2&gt;
  
  
  Creating a WSGI Server from Scratch
&lt;/h2&gt;

&lt;p&gt;Let’s build a basic server that responds to a request to &lt;code&gt;/hello&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;## app.py
def application(environ, start_response):
    method = environ['REQUEST_METHOD']
    path = environ['PATH_INFO']
    query = environ['QUERY_STRING']
    print("Client requested:", method, path, query)
    print("Environment variables:", environ)
    print("start_response function:", start_response)
    if path == '/hello':
        response = [b'{"message": "hello"}']
    else:
        response = [b'{"error": "Not Found"}']
    status = '200 OK' if path == '/hello' else '404 Not Found'
    headers = [('Content-Type', 'application/json')]
    start_response(status, headers)
    return response
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;## run.py
from wsgiref.simple_server import make_server
from app import application
port = 8000
httpd = make_server('', port, application)
print(f"Serving on port {port}...")
httpd.serve_forever()
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In your terminal you can run &lt;code&gt;python run.py&lt;/code&gt; and you’ll get an output like &lt;code&gt;Serving on port 8000...&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;By diving into WSGI, you’re not only learning how requests are handled,&lt;br&gt;
you’re learning about Python web framework design and the beauty of interface-based architecture. The complete specification exists in &lt;a href="https://peps.python.org/pep-3333/" rel="noopener noreferrer"&gt;PEP 3333&lt;/a&gt;, and I recommend reading through it after you’ve created a simple WSGI app yourself. It’s brief, readable, and full of insight into what keeps Python’s web world going.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Google Summer of Code 2021 Final Report</title>
      <dc:creator>Hasan Faraz Khan</dc:creator>
      <pubDate>Thu, 19 Aug 2021 13:34:53 +0000</pubDate>
      <link>https://dev.to/farazkhanfk7/google-summer-of-code-2021-final-report-4h15</link>
      <guid>https://dev.to/farazkhanfk7/google-summer-of-code-2021-final-report-4h15</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fy02vnnw4uzsgu28ow76y.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fy02vnnw4uzsgu28ow76y.jpeg" alt="Logo" width="800" height="373"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Google Summer of Code 2021 Final Report
&lt;/h1&gt;

&lt;p&gt;This summer, I was pleased to get selected for Google Summer of Code'21 under the &lt;a href="https://www.hydraecosystem.org/" rel="noopener noreferrer"&gt;Hydra Ecosystem&lt;/a&gt; organization. Hydra Ecosystem aims to build a set of tools to automate the process of building REST APIs and Next-Gen smart clients which follow the principle of Semantic Web, Linked Data, and JSON-LD. Hydra is a vocabulary for APIs which machines can understand and it is currently a draft that is created and maintained by &lt;a href="https://www.hydra-cg.com/" rel="noopener noreferrer"&gt;Hydra-CG&lt;/a&gt;. This is a summary of my work done this summer in GSoC 2021. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Project:&lt;/strong&gt; &lt;a href="https://summerofcode.withgoogle.com/projects/#6336003247177728" rel="noopener noreferrer"&gt;General Improvements in Hydrus&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Abstract
&lt;/h2&gt;

&lt;p&gt;The project idea was about improvements in existing hydrus ( flagship server ). This included support for POST operation on &lt;code&gt;hydra:Collection&lt;/code&gt;. New functionalities were added to effectively update, get or delete particular members from a Collection without actually sending the whole collection in the request payload. A lot of improvements were made in CRUD operations of hydrus, including setting up constraints and handling errors on the server-side depending upon how the data is stored. The project also aims to enhance the functionality of hydrus, optimize existing codes and keep it synced with upgrades and development in hydra-python-core and Hydra specifications. Some major changes were made in the test suite and even more tests were added for CRUD operations. New features were added to support different datatypes in hydrus and provide technical support for OpenRisk's Banking API project.&lt;/p&gt;

&lt;h1&gt;
  
  
  Coding Period
&lt;/h1&gt;

&lt;blockquote&gt;
&lt;p&gt;List of deliverables and major tasks completed&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Changed resource URI format in hydra-python-core
&lt;/h2&gt;

&lt;p&gt;In the last week of Community Bonding Period I was asked to review a PR in the hydra-python-core library and realized that it needs some more changes. The issue was about changing the format of URIs. It took me some days to understand the issue and debug the core library to find the required changes.&lt;/p&gt;

&lt;p&gt;I submitted the following PRs to solve the issue:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/HTTP-APIs/hydra-python-core/pull/81" rel="noopener noreferrer"&gt;https://github.com/HTTP-APIs/hydra-python-core/pull/81&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/HTTP-APIs/hydra-python-core/pull/84" rel="noopener noreferrer"&gt;https://github.com/HTTP-APIs/hydra-python-core/pull/84&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/HTTP-APIs/hydrus/pull/578" rel="noopener noreferrer"&gt;https://github.com/HTTP-APIs/hydrus/pull/578&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Support POST operation on hydra:Collection
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;Added support to get/update/delete members of a collection&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Updation of hydra:Resource is allowed in hydrus (our flagship server ) and hydra:Collection is also a subclass of hydra:Resource, however making a POST request to a Collection wasn’t allowed. The reason behind this was that we were still trying to find an effective method to update/delete few hydra:members from a Collection without actually sending the whole collection in the request body which was definitely not the right way to go with as it will increase the server payload. The idea was about creating new endpoints in hydrus which will take both a collection id and it’s member id as parameters.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;GET: /&amp;lt;api_name&amp;gt;/&amp;lt;collection_name&amp;gt;/&amp;lt;collection_id&amp;gt;/&amp;lt;member_id&amp;gt;
DELETE: /&amp;lt;collection_name&amp;gt;/&amp;lt;collection_id&amp;gt;/delete/&amp;lt;member_id&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This was done in the following : &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Related Issue : &lt;a href="https://github.com/HTTP-APIs/hydrus/issues/494" rel="noopener noreferrer"&gt;https://github.com/HTTP-APIs/hydrus/issues/494&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;PR : &lt;a href="https://github.com/HTTP-APIs/hydrus/pull/554" rel="noopener noreferrer"&gt;https://github.com/HTTP-APIs/hydrus/pull/554&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Deletion of multiple members from the Collection
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;The next step was allowing the same for deletion of multiple members from the Collection. I created something similar for Collections as well. The endpoint I created would take name of the collection and a list of object ids as a parameter.&lt;br&gt;
&lt;/p&gt;
&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/&amp;lt;api-name&amp;gt;/&amp;lt;resource_name&amp;gt;/&amp;lt;collection-id&amp;gt;/delete/&amp;lt;ids_list&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here’s the issue and PR for the same :&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/HTTP-APIs/hydrus/issues/579" rel="noopener noreferrer"&gt;https://github.com/HTTP-APIs/hydrus/issues/579&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/HTTP-APIs/hydrus/pull/580" rel="noopener noreferrer"&gt;https://github.com/HTTP-APIs/hydrus/pull/580&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/HTTP-APIs/hydrus/pull/591" rel="noopener noreferrer"&gt;https://github.com/HTTP-APIs/hydrus/pull/591&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Change URI format for GET/POST/PUT/DELETE for hydra:Resource
&lt;/h2&gt;

&lt;p&gt;After discussion with mentors, we decided that it would be better to pass the ids separated after a comma as a query parameter instead of using keywords like delete or add . Also, this would make the code for Resource much cleaner as we won’t have to create separate API views for deletion of single instances or multiple. I had to make this change for all existing routes and request methods, and this was the final result.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/&amp;lt;api-name&amp;gt;/&amp;lt;resource_name&amp;gt;/&amp;lt;collection-id&amp;gt;?instances=&amp;lt;ids_list&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Also modified existing endpoints for creation of multiple objects in a single request. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;PUT&lt;/strong&gt; ( Response ):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{
 "@context":"https://www.w3.org/ns/hydra/core",
 "@type": "Status",
 "description": "Objects with ID ['id1','id2'] successfully added",
 "iri": ["id1","id2"],
 "statusCode": 201,
 "title": "Objects successfully added"
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;DELETE&lt;/strong&gt;:&lt;/p&gt;

&lt;p&gt;URI : &lt;code&gt;/serverapi/Movie?instances=id1,id2,id3&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Response:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{
 "@context":"https://www.w3.org/ns/hydra/core",
 "@type": "Status",
 "description":"Objects with ID ['id1','id2'] successfully deleted",
 "statusCode": 200,
 "title": "Objects successfully deleted"}
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;PR : &lt;a href="https://github.com/HTTP-APIs/hydrus/pull/591" rel="noopener noreferrer"&gt;https://github.com/HTTP-APIs/hydrus/pull/591&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Foreign-key relationship between a hydra:Class and hydra:Collection
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;This issue was about creating a foreign-key relationship between a hydra:Class and hydra:Collection&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Previously, if an object was being deleted from a Class it would still be there in the collection table in database( if it was previously inserted in a Collection that directly manages that Class). In such a case, a GET response from Collection endpoint will show the member available in the database but will throw an InstanceNotFound error when a GET request will be made to view details of the object because it has already been deleted from the Class. To fix this, I used &lt;code&gt;manages&lt;/code&gt; keyword to check if a &lt;code&gt;hydra:Collection&lt;/code&gt; actually manages that Class.&lt;/p&gt;

&lt;p&gt;Here’s the issue and PR for the same :&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Issue: &lt;a href="https://github.com/HTTP-APIs/hydrus/issues/592" rel="noopener noreferrer"&gt;https://github.com/HTTP-APIs/hydrus/issues/592&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;PR : &lt;a href="https://github.com/HTTP-APIs/hydrus/pull/593" rel="noopener noreferrer"&gt;https://github.com/HTTP-APIs/hydrus/pull/593&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Support for different dataypes columns in database
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;Previously, all database columns were set to String as there was no way of specifying the type of variable for a hydra:supportedProperty.&lt;br&gt;
I discussed the implementation in a weekly meeting with mentors and came up with the final approach which was using range keyword to specify the type of a supported property. &lt;code&gt;range&lt;/code&gt; keyword can be used to specify the datatype of a property according to Hydra specifications. We already have hydra:range (which is also inherited from rdfs:range) in our API documentation’s context.&lt;br&gt;
&lt;/p&gt;
&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;"range": {
     "@id": "rdfs:range",
     "@type": "@id"
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The idea was that a user can add range as an keyword argument in HydraClassProp while creating an apidoc like range="xsd:float" which will be expanded by doc_maker and then interpreted as &lt;a href="https://www.w3.org/TR/xmlschema-2/#float" rel="noopener noreferrer"&gt;https://www.w3.org/TR/xmlschema-2/#float&lt;/a&gt;. Now, hydrus will look into apidoc and then create attributes in database table according to their respective column types.&lt;/p&gt;

&lt;p&gt;Related Issues and Pull Requests:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/HTTP-APIs/hydrus/issues/581" rel="noopener noreferrer"&gt;https://github.com/HTTP-APIs/hydrus/issues/581&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/HTTP-APIs/hydrus/pull/594" rel="noopener noreferrer"&gt;https://github.com/HTTP-APIs/hydrus/pull/594&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/HTTP-APIs/hydra-python-core/issues/88" rel="noopener noreferrer"&gt;https://github.com/HTTP-APIs/hydra-python-core/issues/88&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/HTTP-APIs/hydra-python-core/pull/91" rel="noopener noreferrer"&gt;https://github.com/HTTP-APIs/hydra-python-core/pull/91&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Add support for datetime column in hydrus
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;At this point, only integer, float, string were supported datatypes in database.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The idea was that user should be able to specify datatype like "xsd:dateTime" while creating API doc. Database columns should be created accordingly. SQLAlchemy Datetime Column only takes a datetime object. But a user cannot send a datetime object in request body ( not json serializable ). This is why I created helper functions to convert datetime string to a python datetime object and then it'll be inserted to database. The helper function (get_modified_object) checks if there is any supported property in object (request body) which is actually a datetime field. And then returns a modified object accordingly.&lt;/p&gt;

&lt;p&gt;Related Issues and Pull Requests:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/HTTP-APIs/hydrus/issues/598" rel="noopener noreferrer"&gt;https://github.com/HTTP-APIs/hydrus/issues/598&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/HTTP-APIs/hydrus/pull/599" rel="noopener noreferrer"&gt;https://github.com/HTTP-APIs/hydrus/pull/599&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Changes in existing test cases in hydrus.
&lt;/h2&gt;

&lt;p&gt;Added some more tests and made modifications in existing test cases. Regex was being used to get the id of the inserted object from response description. Instead of that I used &lt;code&gt;response.location&lt;/code&gt; to get IDs of created objects throughout the tests.&lt;/p&gt;

&lt;p&gt;PR : &lt;a href="https://github.com/HTTP-APIs/hydrus/pull/601" rel="noopener noreferrer"&gt;https://github.com/HTTP-APIs/hydrus/pull/601&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Dockerization for POC
&lt;/h2&gt;

&lt;p&gt;The next task assigned to me was to containerize &lt;a href="https://github.com/HTTP-APIs/creditrisk-poc" rel="noopener noreferrer"&gt;creditrisk-poc&lt;/a&gt; and use docker-compose to run services like hydrus server and Postgres database inside a container. I made some changes in existing repository and created Dockerfile and a docker-compose file for the same. Previously, we were using ConfigParser to get required environment variable from config.ini file, instead we used &lt;code&gt;os&lt;/code&gt; module to env variables from docker-compose file and used &lt;code&gt;uwsgi.ini&lt;/code&gt; to run the server using nginx. &lt;/p&gt;

&lt;p&gt;Pull Requests:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/HTTP-APIs/creditrisk-poc/pull/25" rel="noopener noreferrer"&gt;https://github.com/HTTP-APIs/creditrisk-poc/pull/25&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/HTTP-APIs/creditrisk-poc/pull/26" rel="noopener noreferrer"&gt;https://github.com/HTTP-APIs/creditrisk-poc/pull/26&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Improvement in test coverage in hydra-python-core using pytest
&lt;/h2&gt;

&lt;p&gt;Only three tests were present for doc_writer and only for testing the context. More tests are added in hydra_python_core for different components of doc_writer like HydraClass, HydraCollection, HydraEntryPoint and many others. Apart from this, we were previously using unittest’s mock to create mock classes and objects. Along with that, I used Pytest’s fixtures to test different components and improve the readability and increase test coverage.&lt;/p&gt;

&lt;p&gt;PR : &lt;a href="https://github.com/HTTP-APIs/hydra-python-core/pull/93" rel="noopener noreferrer"&gt;https://github.com/HTTP-APIs/hydra-python-core/pull/93&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Apart from these deliverables that were completed during the Coding Period. I also worked on some bugs and issues that were found during this period.&lt;br&gt;
I'll be adding a list of all Pull Requests made in the contribution section.&lt;/p&gt;

&lt;h2&gt;
  
  
  🚀 Contributions ( During Coding Period )
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Pull requests
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;PR Link&lt;/th&gt;
&lt;th&gt;Description&lt;/th&gt;
&lt;th&gt;Status&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://github.com/HTTP-APIs/hydrus/pull/554" rel="noopener noreferrer"&gt;#554&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;Added new endpoint to Get/Delete member of a collection.&lt;/td&gt;
&lt;td&gt;Merged ✅&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://github.com/HTTP-APIs/hydrus/pull/578" rel="noopener noreferrer"&gt;#578&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;Update docs and fixed fragments test.&lt;/td&gt;
&lt;td&gt;Merged ✅&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://github.com/HTTP-APIs/hydrus/pull/580" rel="noopener noreferrer"&gt;#580&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;Added endpoint to delete multiple members from a Collection&lt;/td&gt;
&lt;td&gt;Merged ✅&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://github.com/HTTP-APIs/hydrus/pull/590" rel="noopener noreferrer"&gt;#590&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;Changed endpoint format for GET,PUT, DELETE for multiple objects of Class and Collections&lt;/td&gt;
&lt;td&gt;Merged ✅&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://github.com/HTTP-APIs/hydrus/pull/591" rel="noopener noreferrer"&gt;#591&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;Added functional tests for PUT/DELETE multiple class objects&lt;/td&gt;
&lt;td&gt;Merged ✅&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://github.com/HTTP-APIs/hydrus/pull/593" rel="noopener noreferrer"&gt;#593&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;Added foreign key relationship between a Collection and managed Class&lt;/td&gt;
&lt;td&gt;Merged ✅&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://github.com/HTTP-APIs/hydrus/pull/594" rel="noopener noreferrer"&gt;#594&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;Added support for datatype for columns in database tablesn&lt;/td&gt;
&lt;td&gt;Merged ✅&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://github.com/HTTP-APIs/hydrus/pull/597" rel="noopener noreferrer"&gt;#597&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;workflow using GitHub Actions to publish release on PyPi&lt;/td&gt;
&lt;td&gt;Merged ✅&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://github.com/HTTP-APIs/hydrus/pull/599" rel="noopener noreferrer"&gt;#599&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;Added support for datetime column in datebase&lt;/td&gt;
&lt;td&gt;Merged ✅&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://github.com/HTTP-APIs/hydrus/pull/601" rel="noopener noreferrer"&gt;#601&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;Changes in tests in hydrus : removed regex&lt;/td&gt;
&lt;td&gt;Merged ✅&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://github.com/HTTP-APIs/hydrus/pull/603" rel="noopener noreferrer"&gt;#603&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;Fix get_host_domain function for deployment&lt;/td&gt;
&lt;td&gt;Merged ✅&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://github.com/HTTP-APIs/hydra-python-core/pull/81" rel="noopener noreferrer"&gt;#81&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;Changed resource URI format in hydra-python-core&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Open&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://github.com/HTTP-APIs/hydra-python-core/pull/84" rel="noopener noreferrer"&gt;#84&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;Modified doc_maker and updated sample docs&lt;/td&gt;
&lt;td&gt;Merged ✅&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://github.com/HTTP-APIs/hydra-python-core/pull/91" rel="noopener noreferrer"&gt;#91&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;Added support for datatype(range) in supported properties&lt;/td&gt;
&lt;td&gt;Merged ✅&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://github.com/HTTP-APIs/hydra-python-core/pull/93" rel="noopener noreferrer"&gt;#93&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;Added tests in hydra python core&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Open&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://github.com/HTTP-APIs/creditrisk-poc/pull/25" rel="noopener noreferrer"&gt;#25&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;Dockerize creditrisk_pocon&lt;/td&gt;
&lt;td&gt;Merged ✅&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://github.com/HTTP-APIs/creditrisk-poc/pull/26" rel="noopener noreferrer"&gt;#26&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;remove apidoc path environment variable from docker compose&lt;/td&gt;
&lt;td&gt;Merged ✅&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  Acknowledgements
&lt;/h2&gt;

&lt;p&gt;I would like to thank my mentors for their guidance and suppport through the project and GSoC journey.&lt;br&gt;
I thoroughly believe it had a positive impact on my style of writing codes and tests. I am highly enthusiastic to be an active contributor and member of this organization even after completion of my project and will try to give my very best to keep this community active and healthy.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/Mec-iS" rel="noopener noreferrer"&gt;&lt;strong&gt;Lorenzo Moriondo&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/open-risk" rel="noopener noreferrer"&gt;&lt;strong&gt;Phillipos Papadopoulas&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/chrizandr" rel="noopener noreferrer"&gt;&lt;strong&gt;Chris Andrew&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/priyanshunayan" rel="noopener noreferrer"&gt;&lt;strong&gt;Priyanshu Nayan&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/sameshl" rel="noopener noreferrer"&gt;&lt;strong&gt;Samesh Lakhotia&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I would also like to thank my GSoC colleague &lt;a href="https://github.com/Purvanshsingh" rel="noopener noreferrer"&gt;&lt;strong&gt;Purvansh Singh&lt;/strong&gt;&lt;/a&gt; for collaboration and discussions during the program.&lt;/p&gt;

&lt;h2&gt;
  
  
  🔗 Contact
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://github.com/farazkhanfk7" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fimg.shields.io%2Fbadge%2Fgithub-%2523121011.svg%3Fstyle%3Dfor-the-badge%26logo%3Dgithub%26logoColor%3Dwhite" alt="GitHub" width="95" height="28"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://www.linkedin.com/in/farazkhanfk7/" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fimg.shields.io%2Fbadge%2Flinkedin-0A66C2%3Fstyle%3Dfor-the-badge%26logo%3Dlinkedin%26logoColor%3Dwhite" alt="linkedin" width="91" height="28"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://batcypher.medium.com/" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fimg.shields.io%2Fbadge%2FMedium-%2523000000.svg%3Fstyle%3Dfor-the-badge%26logo%3DMedium%26logoColor%3Dwhite" alt="Medium" width="98" height="28"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="mailto:farazkhan138@gmail.com"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fimg.shields.io%2Fbadge%2FGmail-D14836%3Fstyle%3Dfor-the-badge%26logo%3Dgmail%26logoColor%3Dwhite" alt="Gmail" width="87" height="28"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>gsoc</category>
      <category>opensource</category>
      <category>python</category>
      <category>backend</category>
    </item>
  </channel>
</rss>
