<?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: Seenevasaraj</title>
    <description>The latest articles on DEV Community by Seenevasaraj (@seenevasaraj).</description>
    <link>https://dev.to/seenevasaraj</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%2F1098321%2F90891d0f-b9b7-4595-8be3-9ba698f4deb9.png</url>
      <title>DEV Community: Seenevasaraj</title>
      <link>https://dev.to/seenevasaraj</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/seenevasaraj"/>
    <language>en</language>
    <item>
      <title>SQL CRUD OPERATION USING PYTHON</title>
      <dc:creator>Seenevasaraj</dc:creator>
      <pubDate>Tue, 05 Mar 2024 06:09:15 +0000</pubDate>
      <link>https://dev.to/seenevasaraj/sql-crud-operation-using-python-425p</link>
      <guid>https://dev.to/seenevasaraj/sql-crud-operation-using-python-425p</guid>
      <description>&lt;p&gt;Hey Reader,&lt;/p&gt;

&lt;p&gt;My name is Seenevasaraj, and I am working as Software Developer at Luxoft India. The various project at Luxoft I am implementing automation in all viable way. Through this article I desired to provide an explanation about how we can perform CRUD operation in SQL using python module.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;u&gt;SQL&lt;/u&gt;&lt;/strong&gt;&lt;br&gt;
Structured Query Language (SQL)-standardized programming language used to manage relational databases&amp;amp;perform various operations on data in them,created in the 1970s SQL is regularly used database administrators and developers writing data integration scripts,  data analysts looking to set up analytical querie&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;u&gt;SQL Uses&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;modifying database table &amp;amp;index structures;&lt;br&gt;
adding updating&amp;amp;deleting rows of data.Retrieving subsets of information from relational database management systems (RDBMSes)  information can used for transaction processing analytics applications and other applications that require communicating with a relational database&lt;/p&gt;

&lt;p&gt;SQL queries and other operations take form of commands written as statements and aggregated into programs that enable users to add modify or retrieve data from databasetables&lt;/p&gt;

&lt;p&gt;table is most basic unit of database and consists of rows columns of data,single table holds records and each record is stored in row of table,tables are most used type of database objects or structures hold or reference data in relational database&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;logical representations ofdata assembled from onORmore database table&lt;/li&gt;
&lt;li&gt;Indexes are in tables help speed up database lookup function&lt;/li&gt;
&lt;li&gt;Reports consist data retrieved from oneORmore tables usually subset ofdata is selected based on search criteria&lt;/li&gt;
&lt;li&gt;Each column present in table corresponds to category of data eg:customer name or address while each row contains data value for intersecting column&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Relational databases- relational because they are composed of tables relate to each other,eg. SQL database used for customer service can have one table for customer names and addresses and other tables hold information about specific purchases product codes and customer contacts,table used to track customer contacts usually uses unique customer identifier called key or primary key to reference customer record in separate table used to store customer data such as name and contact information&lt;/p&gt;

&lt;p&gt;SQL is very picky language when it comes to syntax&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;u&gt;CRUD&lt;/u&gt;&lt;/strong&gt; &lt;br&gt;
SQL-compatible databases used for their reliability and transactional support, SQL can prove difficult for average non-technical user especially when complex filters sorting or data merging are required,to combat this organizations build internal tools facilitate CRUD operations to interact underlying database&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Creating data &lt;/li&gt;
&lt;li&gt;Retrieving  data&lt;/li&gt;
&lt;li&gt;Updating  data&lt;/li&gt;
&lt;li&gt;Deleting  data&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;&lt;u&gt;CRUD Using Sql Command&lt;/u&gt;&lt;/strong&gt;&lt;br&gt;
For CRUD operations, we will create table with four columns of varying data types, this is not a CRUD operation (even though it’s called a CREATE operation)this is just provisioning table to query from&lt;/p&gt;

&lt;p&gt;We can use CREATE TABLE statement to create table&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fu5byg2381mgzayl17de0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fu5byg2381mgzayl17de0.png" alt="Image description" width="800" height="190"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;INSERT(Create)&lt;/strong&gt;&lt;br&gt;
INSERT operation used to add records, INSERT statements can pick and choose which columns to fill when adding row alternatively, developers can provide values for all fields&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffyho6gzyfeki0ughsz4w.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffyho6gzyfeki0ughsz4w.png" alt="Image description" width="800" height="72"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;SELECT(READ)&lt;br&gt;
SELECT statement used to retrieve records from database,while SELECT statement will return all data from rows by default we can specify which rows and/or columns we need&lt;/p&gt;

&lt;p&gt;Select all columns and rows-use * operator to select all columns and rows from database table&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fha43jaht11hopnt2ymr8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fha43jaht11hopnt2ymr8.png" alt="Image description" width="800" height="67"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;UPDATE&lt;/strong&gt;&lt;br&gt;
UPDATE statement is used to update existing records in database &lt;/p&gt;

&lt;p&gt;UPDATE statement developer update oneORmore columns in specific row(s) by coupling with where clause, Predictably where specifies which rows need to updated&lt;/p&gt;

&lt;p&gt;We will use following syntax to update specific column(s) based on the condition&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxr75bjbw9a26wimgrkod.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxr75bjbw9a26wimgrkod.png" alt="Image description" width="800" height="72"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;DELETE&lt;/strong&gt;&lt;br&gt;
DELETE statement used to delete records from database table&lt;/p&gt;

&lt;p&gt;like UPDATE when using DELETE statement we can specify one or more row(s) to deleted by using where clause,where clause is critical—otherwise on some SQL databases we will delete all of our data&lt;br&gt;
delete specific row from database table&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fb3csp7aydz2p81hnrngk.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fb3csp7aydz2p81hnrngk.png" alt="Image description" width="800" height="73"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Python Prerequisites:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;pyodbc&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;&lt;u&gt;CRUD Using Python&lt;/u&gt;&lt;/strong&gt;&lt;br&gt;
use SQL Server in Python application establish connection to database&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fq9ojh2tgwgzzhu0lalwn.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fq9ojh2tgwgzzhu0lalwn.png" alt="Image description" width="800" height="585"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;create database table to do CRUD operations&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhrldpf78b9p2v4rdtfmm.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhrldpf78b9p2v4rdtfmm.png" alt="Image description" width="800" height="486"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;insert data  into the database table&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F91xv565aaylyo2p4aqwa.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F91xv565aaylyo2p4aqwa.png" alt="Image description" width="800" height="338"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Update  user details in table&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkilndegm2i2gggm2v12o.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkilndegm2i2gggm2v12o.png" alt="Image description" width="800" height="310"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Delete user data from table&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsdlxt2al3l4ttsq12t9b.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsdlxt2al3l4ttsq12t9b.png" alt="Image description" width="800" height="272"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;error handling is crucial working with databases close SQL Server connection when done&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fq48iwsxbl2epj8blvgr2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fq48iwsxbl2epj8blvgr2.png" alt="Image description" width="800" height="284"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;u&gt;Conclusion&lt;/u&gt;&lt;/strong&gt;&lt;br&gt;
I have explained basics of performing CRUD operations using SQL Server Python module to do create table, insert data, query data, update records and delete records &lt;/p&gt;

</description>
    </item>
    <item>
      <title>MANGO DB CRUD OPERATION BY PYTHON</title>
      <dc:creator>Seenevasaraj</dc:creator>
      <pubDate>Tue, 05 Mar 2024 05:34:47 +0000</pubDate>
      <link>https://dev.to/seenevasaraj/mango-db-crud-operation-by-python-3fp7</link>
      <guid>https://dev.to/seenevasaraj/mango-db-crud-operation-by-python-3fp7</guid>
      <description>&lt;p&gt;Hey Reader,&lt;/p&gt;

&lt;p&gt;My name is Seenevasaraj, and I am working as Software Developer at Luxoft India. The various project at Luxoft I am implementing automation in all viable way. Through this article I desired to provide an explanation about how we can perform CRUD operation in MongoDB using python module.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;u&gt;MongoDB&lt;/u&gt;&lt;/strong&gt;&lt;br&gt;
MongoDBdocument database to build highly available scalable internet applications,flexible schema approach,popular with development teams using agile methodologies,offering drivers for all major programming languages&lt;/p&gt;

&lt;p&gt;Instead of storing data in tables of rows or columns like Relational databases, records in MongoDB database is document described in BSON binary representation of data,applications can then retrieve this information in JSON format&lt;/p&gt;

&lt;p&gt;below JSON document describing a historical figure.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fx9mccyx3iy9c1jatoza4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fx9mccyx3iy9c1jatoza4.png" alt="Image description" width="800" height="234"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Document databases highly flexible allowing variations in structure of documents&amp;amp;storing documents are partially complete one document can have others embedded in it,fields in document play role of columns in SQL database and then like columns, they can be indexed to increase search performance&lt;/p&gt;

&lt;p&gt;MongoDB built on scale-out architecture,structure that allows many small machines to work together to create fast systems and handle huge amounts of data&lt;/p&gt;

&lt;p&gt;MongoDB focused on providing developers with excellent user experience, in addition to all its other properties has made MongoDB favorite of developers worldwide for wide variety of application&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Use Of MongoDB&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;MongoDB makes it easy for developers to store structured or unstructured data,using JSON-like format to store documents json format directly maps to native objects in most modern programming languages,developers do not need to think about normalizing data,MongoDB handle high volume&amp;amp;scale vertically or horizontally to accommodate large data&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;u&gt;CRUD&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Creating data&lt;/li&gt;
&lt;li&gt;Retrieving data&lt;/li&gt;
&lt;li&gt;Updating data&lt;/li&gt;
&lt;li&gt;Deleting data&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Create&lt;/strong&gt;&lt;br&gt;
CreateORinsert operations add new documents to collection,If collection not exist,create operations also create the collection&lt;/p&gt;

&lt;p&gt;You can insert single document or multiple documents in single operation&lt;/p&gt;

&lt;p&gt;MongoDB shell provides some methods to insert documents into collection:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;insert a single document-db.collection.insertOne()&lt;/li&gt;
&lt;li&gt;insert multiple documents-db.collection.insertMany()&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Read&lt;/strong&gt;&lt;br&gt;
Read used to retrieve documents from collection; i.e. query collection for documents&lt;/p&gt;

&lt;p&gt;You can specify criteria or filters,which identify documents to return&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Use to collect all data -db.collection.find()&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Update&lt;/strong&gt; &lt;br&gt;
Update operations modify existing documents in collection,you can update single document or multiple documents in single operation&lt;/p&gt;

&lt;p&gt;You can specify criteria or filter which identify documents to update,filters use same syntax as read operations&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;update a single document-db.collection.updateOne()&lt;/li&gt;
&lt;li&gt;update multiple documents-db.collection.updateMany()&lt;/li&gt;
&lt;li&gt;replace document-db.collection.replaceOne()&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;MongoDB preserves own sort order in storing of  documents,ordering internal implementation feature ,you should not rely on any particular structure within it&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Delete&lt;/strong&gt;&lt;br&gt;
Delete operations remove existing documents from collection,you can remove single document or multiple documents in single operation&lt;/p&gt;

&lt;p&gt;You can specify criteria or filters identify documents to remove filters use same syntax as read operations&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;delete multiple documents-db.collection.deleteMany()&lt;/li&gt;
&lt;li&gt;delete single document-db.collection.deleteOne()&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Python Module&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;pymongo&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;&lt;u&gt;CRUD Using Python&lt;/u&gt;&lt;/strong&gt; &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Prerequisites&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;MongoDB compass must be installed, to make local database connection&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;After installation connect to MongoDB compass by passing the below string as input and click on the connect button.&lt;br&gt;
&lt;u&gt;mongodb://localhost:27017/&lt;/u&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8yg6b1t5oh6ormr4hm9u.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8yg6b1t5oh6ormr4hm9u.png" alt="Image description" width="800" height="366"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Steps to do CRUD&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Import the pymongo package,and thendefine variable to store the MongoDB connection URL.To make connection to MongoDB server, we will use MongoClient method&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ft6wxuqrgnlswe6ujm4vy.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ft6wxuqrgnlswe6ujm4vy.png" alt="Image description" width="800" height="62"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;by using client instance created, can access databases in MongoDB,display databases use list_database_names()&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fde4l8g5y6thkxmjtkty3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fde4l8g5y6thkxmjtkty3.png" alt="Image description" width="800" height="58"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;In MongoDB, unless we add any document to database, we cannot see database created in list of available databases,to create document, we need to create collection in database which stores documents&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fglf5dmwl51acrd9k76bx.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fglf5dmwl51acrd9k76bx.png" alt="Image description" width="800" height="74"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcc5wucwbw65tvm6h4b74.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcc5wucwbw65tvm6h4b74.png" alt="Image description" width="800" height="86"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Inserting documents&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Inserting documents into collection can be done two ways&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;insert single document - insert_one() method&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxg4n2mzrpubn3yukhqc0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxg4n2mzrpubn3yukhqc0.png" alt="Image description" width="800" height="138"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;insert multiple document - insert_many() method&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fy7w9w2f880olqpibb2hf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fy7w9w2f880olqpibb2hf.png" alt="Image description" width="800" height="140"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Retrieving&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Retrieving data can be done in two ways&lt;/p&gt;

&lt;p&gt;retrieve single document - find_one() method,need to pass query as parameter to find_one() method .find_one() method search collection and it will return first hit document&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fae95hy7izta9sw6n22hb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fae95hy7izta9sw6n22hb.png" alt="Image description" width="800" height="89"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;retrieve multiple documents - find_many(),find_many() is cursor object-use for loop to loop over cursor object&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9edvjnx45vp62157ob6w.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9edvjnx45vp62157ob6w.png" alt="Image description" width="800" height="135"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Updating&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Updating documents can be done by two ways&lt;/p&gt;

&lt;p&gt;update single document - update_one() method&lt;/p&gt;

&lt;p&gt;to update documents,need to provide 2 parameters into method,first parameter is filter parameter&amp;amp;second parameter is update parameter,filter parameter is query matches document to be updated, Update parameter is modifications to be applied for document&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvkveyleqxscu253hnf2j.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvkveyleqxscu253hnf2j.png" alt="Image description" width="800" height="135"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;update multiple documents - update_many()&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxfxoe5eisu64h7ky2dav.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxfxoe5eisu64h7ky2dav.png" alt="Image description" width="800" height="113"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Deleting&lt;/strong&gt; &lt;/p&gt;

&lt;p&gt;Deleting documents can be done by two ways&lt;/p&gt;

&lt;p&gt;delete single document - delete_one() method by passing query as parameter&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2ilqhdbcktbvdvoxkp0n.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2ilqhdbcktbvdvoxkp0n.png" alt="Image description" width="800" height="91"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;delete multiple documents - delete_many() &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8pbpe9fyovhexuxdrjlg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8pbpe9fyovhexuxdrjlg.png" alt="Image description" width="800" height="81"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Dropping collection&lt;/strong&gt; &lt;br&gt;
drop collection - drop() method,drop method will erase entire data in collection &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8qsuz3jy5pgvhj2rvzxm.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8qsuz3jy5pgvhj2rvzxm.png" alt="Image description" width="800" height="65"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;u&gt;Conclusion&lt;/u&gt;&lt;/strong&gt;&lt;br&gt;
MongoDB accommodate wide Varity of data format, So it can be used for lot of purpose and along with python we can perform CRUD operation effectively and automated way. &lt;/p&gt;

</description>
    </item>
    <item>
      <title>READ FILES IN GIT REPO USING DIFFERENT MODULES IN PYTHON</title>
      <dc:creator>Seenevasaraj</dc:creator>
      <pubDate>Mon, 26 Feb 2024 12:15:51 +0000</pubDate>
      <link>https://dev.to/seenevasaraj/read-files-in-git-repo-using-different-modules-in-python-4fj4</link>
      <guid>https://dev.to/seenevasaraj/read-files-in-git-repo-using-different-modules-in-python-4fj4</guid>
      <description>&lt;p&gt;Hey Reader,&lt;/p&gt;

&lt;p&gt;My name is Seenevasaraj, and I am working as Software Developer at Luxoft India. The various project at Luxoft I am implementing automation in all viable way. Through this article I desired to provide an explanation about how we can automate the git repo files reading using some of python modules.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;u&gt;GIT &lt;/u&gt;&lt;/strong&gt;&lt;br&gt;
Git is distributed version control system widely used in source code management and tracking changes in source code,It created by Linus Torvalds in 2005 to manage the development of Linux kernel, it become the standard for version control in many other projects and industries&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Repository&lt;/strong&gt;-A repository or repo, is a collection of files and their revision history. Git repositories can exist locally on your computer or remotely on a server.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Clone&lt;/strong&gt;-Clone a repository means to create a copy of it on your local machine&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Commit&lt;/strong&gt;-Commit is snapshot of changes made to the repository at a specific time. It represents a single atomic unit of change.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Branch&lt;/strong&gt;-Branch is a parallel version of a repository codeIt allows developers to work on separate features or fixes without interfering with the main codebaseGit uses branches to manage changes.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Merge&lt;/strong&gt;-Merging is process of integrating changes from one branch into another it combines the changes made in one branch with another branch&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Pull Request&lt;/strong&gt;-pull request[PR] is way to propose changes to repositoryIt allows developers to review code, discuss changes, and collaborate on projects in many workflows,pull requests are used for code review before changes are merged into the main codebase&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Push&lt;/strong&gt;-pushing refers to sending committed changes to remote repository and making them accessible to others&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Fetch&lt;/strong&gt;-Fetching retrieves changes from remote repository without merging them into your local branchesIt updates your local repository with changes from remote server&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;u&gt;Pull&lt;/u&gt;&lt;/strong&gt;-Pulling is combination of fetching changes and merging them into your local branch&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;u&gt;Remote&lt;/u&gt;&lt;/strong&gt;-remote is version of the repository hosted on the internet or network,It serves as common repository for all team members to exchange their changes&lt;/p&gt;

&lt;p&gt;These are just a few of the fundamental concepts and commands. Git powerful tool with many features and capabilities that enable efficient collaboration and version control in software development projects.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;u&gt;Modules to read files in git branch&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;requests&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;gitpython&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;&lt;u&gt;requests module&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;To establish connection with Git branches in Python requests module typically interact with a Git repository through its remote URL using Git's HTTP(S) API&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.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%2Fsxk7qtms6w8su2fszi9u.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2Fsxk7qtms6w8su2fszi9u.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In this example:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;We call the URL to Git repository, which is used to interact with using HTTP.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;We can make GET request to this URL using requests.get()&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;We can read response lines and extract branch names using iter_lines() method of the response object,branch names typically found in lines starting with "refs/heads/"&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Git repository is accessible over HTTP(S) and that the server supports Git's HTTP protocol,some repositories may require authentication, include appropriate authentication headers in the request&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;u&gt;gitpython&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;install GitPython by using  pip install GitPython command.  provide proper repo_path, branch, and file_paths variables according to your Git repository structure and the files you intend to read.&lt;/p&gt;

&lt;p&gt;Read files from Git repository using GitPython in Python,which provides high-level interface to interact with Git repositories.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.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%2F5jxf6wzrofoug3fli20o.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2F5jxf6wzrofoug3fli20o.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;import the Repo class from the git module of GitPython&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;define a function read_files_from_git that takes path to repo_path, the branch name and list of file paths as input.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Inside function open the Git repository using Repo(repo_path).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;retrieve the commit at the head of the specified branch using repo.commit(branch)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;iterate over the list of file paths provided and read the contents of each file from the commit's tree object using commit.tree[file_path].data_stream.read().decode('utf-8')&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;return python dictionary format containing the file paths as keys and values&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;&lt;u&gt;Comparision of requests and gitpython&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;

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

&lt;p&gt;&lt;strong&gt;Requests&lt;/strong&gt;: requests is primarily used to make HTTP request,it allows to interact with web services APIs, and web pages&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;GitPython&lt;/strong&gt;: it provides interface to interact with Git repositories directly from Python code and allows to perform various Git operations eg,cloning committing, branching, merging,etc..&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Level of Abstraction&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Requests&lt;/strong&gt;: requests operates at lower level of abstraction dealing directly with HTTP requests&amp;amp;responses,provides functionalities for sending HTTP requests &amp;amp; responses managing cookies and setting headers&lt;/p&gt;

&lt;p&gt;GitPython: It operates at higher level of abstraction providing an object-oriented interface to interact with Git repo and abstracts away many of low-level details of Git commands and allows to perform Git operations programmatically&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Use Cases&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Requests&lt;/strong&gt;: requests is common tasks - consuming RESTful APIs, fetching web page downloading files and interacting with web services&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;GitPython&lt;/strong&gt;: GitPython is used to work with Git repositories programmatically like automating Git operations analyzing repository data extracting file contents or integrating Git functionality into larger Python applications&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;u&gt;Conclusion&lt;/u&gt;&lt;/strong&gt;&lt;br&gt;
As developer, based on development environment they can select either requests or gitpython, more less both have same kind of functionalities. But requests module have more advantage by making REST-API requests.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>JENKINS CI/CD PIPELINE FOR PYTHON PROJECT</title>
      <dc:creator>Seenevasaraj</dc:creator>
      <pubDate>Fri, 23 Feb 2024 09:10:12 +0000</pubDate>
      <link>https://dev.to/seenevasaraj/jenkins-cicd-pipeline-for-python-project-2c2l</link>
      <guid>https://dev.to/seenevasaraj/jenkins-cicd-pipeline-for-python-project-2c2l</guid>
      <description>&lt;p&gt;Hey Reader,&lt;/p&gt;

&lt;p&gt;My name is Seenevasaraj, and I am working as Software Developer at Luxoft India. The various project at Luxoft, I am implementing automation in all viable way. Through this article I desired to provide an explanation about Jenkins and how it is helps in CI/CD process and how you can setup python environment in jenkins.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;u&gt;What is CI/CD?&lt;/u&gt;&lt;/strong&gt;&lt;br&gt;
CI/CD is development approach that automates the integration testing and delivery of code updates to production environments. The CI/CD process typically includes the following steps: &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Continuous Integration&lt;/strong&gt;: Developers merge their code changes into a shared repository regularly, often several times a day. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;ContinuousTesting&lt;/strong&gt;: Automated tests are run on the merged code to check for errors andensure the codeworks as expected.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;ContinuousDelivery(orDeployment)&lt;/strong&gt;: Once the testing passes the code is automatically deployed to a production environment or a testing environment that closely resembles production. This way developers can quickly and reliably deliver new features bug fixes, and updates to production, while maintaining a high quality of software.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;u&gt;&lt;strong&gt;CI/CD depends on&lt;/strong&gt;&lt;/u&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Version ControlSystem&lt;/strong&gt;: - Git (or) other centralized systems allow developers to commit their code changes&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Automated Build Tools&lt;/strong&gt;: - Tools like Jenkins,Travis CI or GitLab CI automatically build the application when code changes are pushed to the repository&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Automated Testing&lt;/strong&gt;: - Unit tests integration ,other tests run automatically during the CI/CD process to ensure code quality&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Artifact Repositories&lt;/strong&gt;: - A storage location for built artifacts like Dockerimages or compiled binaries produced during the CI/CD process &lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;CI/CD (continuous integration and continuous delivery) is an essential modern softwaredevelopment practice that streamlines processes enhances code quality and makes deployments more reliable It enables Agile&amp;amp;DevOps teams to rapidly develop test and deliver software&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;u&gt;What Is jenkins?&lt;/u&gt;&lt;/strong&gt;&lt;br&gt;
Jenkins is a popular open-source tool that helpsSsoftware development teams automate their tasks It is written in Java and assists in building testing and deploying applications With Jenkins teams can implement ContinuousIntegration(CI) and ContinuousDelivery(CD) pipelines enabling them to automate the development process ensuring the quality and consistency of their software.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;ContinuousIntegration:&lt;/strong&gt; - Jenkins integrates code changes into a centralized repository continually. - It triggers automatic builds when changes are pushed to version control systems. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Extensibility:&lt;/strong&gt; - Jenkins has large ecosystem of plugins that enhance its capabilities Plugins integrate with version control systems, build tools testingframeworks and deployment platforms. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;BuildAutomation:&lt;/strong&gt; - Jenkins automates the build process for various programming languages and build tools. - It compiles code, executes tests, and generates deployable artifacts&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Jenkins allows teams to define build pipelines using code providing version control transparency and flexibility for complex CI/CD workflows &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Jenkins supports distributed builds enabling teams to efficiently scale their build infrastructure horizontally resulting in faster build times and optimal resource usage.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Jenkins integrates with external systems like issue trackers collaboration platforms and cloud providers facilitating seamless collaboration issue tracking, and cloud resource management.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Monitoring and Reporting:&lt;/strong&gt; Jenkins has dashboards and reports that let you keep track of the status of your builds and pipelines It also gives you insights into how long builds take how tests are doing and other things. This can help teams find bottlenecks and make their CI/CD processes more efficient&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Security and Access Control:&lt;/strong&gt; Jenkins has strong security features like authentication, authorization and encryption It can also be integrated with LDAP Active Directory and other identity providers This lets organizations set up access controls and keep track of who did what&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;u&gt;&lt;strong&gt;Declaring Python Path In Jenkins&lt;/strong&gt;&lt;/u&gt;&lt;/p&gt;

&lt;p&gt;In order to execute python scripts in jenkins we have to declare our python.exe and pip.exe path in jenkins environmental variable section.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Log in Jenkins instance and enter the dashboard. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;On the left-hand menu click the "Manage Jenkins" link.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Under the "Manage Jenkins" page, select the option that says "Configure System." Here you can modify the global settings of your Jenkins instance.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Locate the "Global properties" Section: - Scroll down the page until you find the "Global properties" section. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Activate"Environment variables"- In the "Global properties" section check the "Environment variables" box to enable it.Add an Environment Variable- Click "Add" button to create a new environment variable.&lt;br&gt;
Specify Name and Value- In the "Name" field, enter the name of the environment variable (e.g. "MY_VARIABLE"). - In the "Value" field enter the value for the environment variable (e.g."my_value")&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;After declaring your python path, you can use this variable across shell or batch scripts as user requirements.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;u&gt;Jenkins New PIPELINE Creation&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Install Jenkins:&lt;/strong&gt; * Download and install Jenkins on your server or computer if not already installed.Refer to the official Jenkins website for installation instructions. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Install Pipeline Plugin:&lt;/strong&gt; * The Pipeline plugin supports continuous delivery pipelines in Jenkins Ensure it installed on your Jenkins instance From the Jenkins dashboard go to "Manage Jenkins"&amp;gt;"Manage Plugins"&amp;gt;"Available." * Search for "Pipeline" and install the plugin.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Log in Jenkins account and choose "New Item" to create a new job Put a name for your pipeline task and mark "Pipeline" as the task type, Click "OK".&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Set up the Pipeline: - In the pipeline configuration, you can pick how to write your pipeline using Jenkinsfile or Scripted Pipeline. - If you want to use a Jenkinsfile, mark "Pipeline script from SCM" as the definition and tell Jenkins where your Jenkinsfile is, like in Git. - If you'd rather write the pipeline script directly in the Jenkins job settings, choose "Pipeline script" and put your script in the provided box.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Crafting a Pipeline Script: Shape your CI/CD pipeline script using either the Declarative or Scripted syntax. - With the Declarative Pipeline approach, structure and conciseness are at your disposal. - The Scripted Pipeline option grants you the flexibility of Groovy scripting. Visualize your pipeline's journey through stages and steps, employing directives to orchestrate each stage's behavior. Example:&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fuycf9jh9nat2mvblaqmx.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fuycf9jh9nat2mvblaqmx.png" alt="Image description" width="795" height="692"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Save and Run Pipeline&lt;/strong&gt;: - Save the configuration of your pipeline. - Jenkins automatically starts a build based on the trigger you set (like a webhook or cron job). - Manually start the pipeline using the "Build Now" button in the Jenkins job dashboard. &lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;&lt;u&gt;Conclusion&lt;/u&gt;&lt;/strong&gt;&lt;br&gt;
Jenkins is automation tool that helps software development teams implement Continuous Integration(CI)&amp;amp;Continuous Delivery (CD) practices, it allows them to automate various tasks associated with software development and deployment making the process more efficient and streamlined&lt;/p&gt;

</description>
    </item>
    <item>
      <title>DIFFERENT TYPE OF API PROTOCOLS AND ARCHITECTURES</title>
      <dc:creator>Seenevasaraj</dc:creator>
      <pubDate>Wed, 14 Feb 2024 11:23:14 +0000</pubDate>
      <link>https://dev.to/seenevasaraj/different-type-of-api-protocols-and-architectures-142d</link>
      <guid>https://dev.to/seenevasaraj/different-type-of-api-protocols-and-architectures-142d</guid>
      <description>&lt;p&gt;Hey Reader,&lt;/p&gt;

&lt;p&gt;My name is Seenevasaraj, and I am working as Software Developer at Luxoft India. The various project at Luxoft, I am implementing automation in all viable way. Through this article I desired to provide an explanation about different types API's are used across software developers and it's usage.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;u&gt;What is API&lt;/u&gt;&lt;/strong&gt;&lt;br&gt;
The API(Application Programming Interfaces) is a powerful and versatile means to connect diverse and disparate software applications. APIs permit a giant array of unrelated software merchandise to integrate and interoperate with different software program and records. APIs additionally permit builders to add functions and functionality to software by means of utilising a wealthy array of different developers' APIs. Much of modern-day enterprise, cellular and internet software relies upon on a wide range of APIs.&lt;/p&gt;

&lt;p&gt;Developers can work with an assortment of API types, protocols and architectures that suit the unique needs of different packages and agencies.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;u&gt;Different Types&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;REST APIs (Representational State Transfer):&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Architecture&lt;/strong&gt;: RESTAPIs represent data's in simple formats (JSON or XML).&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Our system boasts a uniform interface, making it engaging and easy to use for all clients. It also boasts a stateless architecture, ensuring efficient and smooth communication. With our native caching feature, clients can enjoy a speedy and seamless browsing experience. Deemed as a reliable and robust client-server architecture, our system supports a layered system model, providing flexibility and adaptability. Lastly, our system has the ability to provide executable code to the client, enabling them to access and execute relevant functions promptly and effectively.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;

&lt;p&gt;Pros:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Flexibility is achieved by decoupling the client from the server. This also means that the system is cache-friendly and can handle various formats with ease.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;

&lt;p&gt;Cons:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Having extensive metadata can result in significant payloads, while not having a clear agreement on message structure can present difficulties during implementation.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Common Use Cases&lt;/strong&gt;: Easily create minimalistic resource-focused applications using Management APIs.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;SOAP APIs[Simple Object Access Protocol]:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Format: SOAP-APIs use XML files.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Pros:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Communication is bolstered by robust standards, while security is seamlessly integrated into the system.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;

&lt;p&gt;Cons:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;XML format often leads to verbosity, resulting in slower performance when compared to REST&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Common Use Cases:&lt;/strong&gt; By adapting By utilizing When implementing into business protocols, incorporating enterprise systems and modern applications into practices can transform legacy applications.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Open APIs:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Definition&lt;/strong&gt;: Publicly available open APIs allow third-party developers to easily access specific features or data from an application.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Use Cases&lt;/strong&gt;: Creating partnerships with external services and constructing interconnected systems.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Partner APIs&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Definition&lt;/strong&gt;:Specific partners or collaborators are able to access and utilize partner APIs.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Use Cases&lt;/strong&gt;: Partner systems and joint ventures are both integral components that we are seamlessly incorporating into our operations.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Internal APIs&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Definition&lt;/strong&gt;:Internal APIs, which are also referred to as private APIs, facilitate communication between various services within an organization.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Use Cases&lt;/strong&gt;: Experience the seamless integration of our internal systems through our cutting-edge microservices architecture.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Composite APIs:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Definition&lt;/strong&gt;: Composite APIs have the ability to merge several APIs, creating a more convenient and streamlined interface for users.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Use Cases&lt;/strong&gt;: Gathering information from multiple sources and streamlining user interactions.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;&lt;u&gt;How To Choose API's According To Your Software Requirements&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Identify Your Purpose:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Immediate Problem&lt;/strong&gt;: Think about the exact problem you're currently facing. What key features are necessary for solving it?&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Future Needs&lt;/strong&gt;: As you consider your application's future needs, contemplate the features and capabilities that will be necessary in the next five to ten years. This proactive thinking will serve as a valuable compass in determining the best API for your usage.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Understand Your Audience:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Who Will Use It?&lt;/strong&gt;: Determine the intended audience for your API. Is it for internal use within your organization, for partners, or for external developers?&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Private, Public, or External&lt;/strong&gt;: APIs can be categorized as private (for in-house use), public/partner (for known developers or business partners), or external (available to any third-party developer). Choose the type that aligns with your goals2.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Evaluate API Solutions Based on Criteria:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Performance&lt;/strong&gt;: When it comes to a competitive market, dependable uptime is essential. Don't forget about the importance of speed as well – take performance into consideration.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;API Specifications:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;REST, also known as Representational State Transfer, is a highly sought-after architectural style for APIs. By setting communication standards between computer systems, REST simplifies the flow of data within applications. With their simple and adaptable nature, RESTful APIs have gained widespread popularity.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;&lt;u&gt;API Usage&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;

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

&lt;ul&gt;
&lt;li&gt;In microservices-based applications, each service communicates via APIs. This modular approach allows scalability, flexibility, and independent development of services.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Data Retrieval and Aggregation:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;News Aggregators&lt;/strong&gt;: APIs collect news articles from different publishers.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Financial Data APIs&lt;/strong&gt;: Retrieve up-to-date data for stock prices, currency exchange rates, or economic indicators with ease.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Automation&amp;amp;Bots:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;With the use of natural language processing services, you can easily incorporate chatbot APIs to create conversational bots that interact with your users. - Enhance your testing process by utilizing APIs that enable testing tools to interact seamlessly with web applications.&lt;/li&gt;
&lt;/ul&gt;

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

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;HRSystems&lt;/strong&gt;: APIs facilitate the integration of payroll, leave management, and employee databases.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;InventoryManagement&lt;/strong&gt;: APIs connect inventory systems with sales and order processing, creating a seamless connection between the two.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;&lt;u&gt;Conclusion&lt;/u&gt;&lt;/strong&gt;&lt;br&gt;
APIs are the heart and soul of contemporary software development. It's crucial to keep in mind that the perfect API selection relies heavily on your unique circumstances and objectives. Regardless of whether you're creating a compact application or an extensive system, comprehending your needs will steer you towards the most suitable API resolution&lt;/p&gt;

</description>
    </item>
    <item>
      <title>BIGQUERY DATA INSERTION USING PYTHON</title>
      <dc:creator>Seenevasaraj</dc:creator>
      <pubDate>Tue, 13 Feb 2024 08:32:15 +0000</pubDate>
      <link>https://dev.to/seenevasaraj/bigquery-data-insertion-using-python-381p</link>
      <guid>https://dev.to/seenevasaraj/bigquery-data-insertion-using-python-381p</guid>
      <description>&lt;p&gt;Hey Reader,&lt;/p&gt;

&lt;p&gt;My name is Seenevasaraj, and I am working as Software Developer at Luxoft India. The various project at Luxoft, I am implementing automation in all viable way. Through this article I desired to provide an explanation about records insertions into bigquery table using &lt;strong&gt;google-cloud-bigquery&lt;/strong&gt;(python module)&lt;/p&gt;

&lt;p&gt;&lt;u&gt;&lt;strong&gt;What is bigquery&lt;/strong&gt;&lt;/u&gt;&lt;br&gt;
BigQuery is a fully managed enterprise data warehouse developed by Google. It offers powerful features for managing and analyzing large datasets. Here are some key points about BigQuery:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Serverless Architecture&lt;/strong&gt;: BigQuery operates in a serverless environment, allowing you to execute standard SQL queries and analyze massive amounts of data without worrying about infrastructure management1.&lt;br&gt;
&lt;strong&gt;Scalability&lt;/strong&gt;: It can handle petabytes of data, making it suitable for organizations dealing with large-scale datasets.&lt;br&gt;
&lt;strong&gt;SQL Queries&lt;/strong&gt;: BigQuery supports querying using a dialect of SQL, which makes it accessible to users familiar with SQL syntax.&lt;br&gt;
Built-in Machine Learning: BigQuery includes built-in machine learning capabilities, enabling advanced analytics and predictive modeling.&lt;br&gt;
&lt;strong&gt;Cost-Effective&lt;/strong&gt;: It’s a cost-effective solution, as you only pay for the resources you use.&lt;br&gt;
&lt;strong&gt;Business Insights&lt;/strong&gt;: By turning big data into valuable business insights, BigQuery helps organizations make informed decisions.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;u&gt;What is google-cloud-bigquery&lt;/u&gt;&lt;/strong&gt;&lt;br&gt;
The google-cloud-bigquery module in Python provides a client library for interacting with Google BigQuery, a powerful data warehouse and analytics platform. Let me break down the key points:&lt;/p&gt;

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

&lt;ul&gt;
&lt;li&gt;Google BigQuery is designed for querying massive datasets quickly using SQL.&lt;/li&gt;
&lt;li&gt;It allows you to analyze data efficiently without worrying about infrastructure management.&lt;/li&gt;
&lt;li&gt;You can focus on finding meaningful insights from your data.&lt;/li&gt;
&lt;/ul&gt;

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

&lt;ul&gt;
&lt;li&gt;NoOps: No need for database administrators; Google manages the infrastructure.&lt;/li&gt;
&lt;li&gt;SQL Queries: You can use familiar SQL syntax to query data.&lt;/li&gt;
&lt;li&gt;Pay-as-you-go Model: You pay only for the resources you use.&lt;/li&gt;
&lt;/ul&gt;

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

&lt;ul&gt;
&lt;li&gt;To use this library, follow these steps:&lt;/li&gt;
&lt;li&gt;Select or create a Cloud Platform project.&lt;/li&gt;
&lt;li&gt;Enable billing for your project.&lt;/li&gt;
&lt;li&gt;Enable the Google Cloud BigQuery API.&lt;/li&gt;
&lt;li&gt;Set up authentication.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Supported Python Versions:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Python &amp;gt;= 3.7 is supported.&lt;/li&gt;
&lt;li&gt;Older versions (Python 2.7, 3.5, 3.6) are not supported.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Example Usage&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fc4mj8rf6z03d0rmohyyo.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fc4mj8rf6z03d0rmohyyo.png" alt="Image description" width="800" height="209"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;u&gt;Bigquery-Python authentication setup&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Create google service account to make python client and bigquery authentication&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;u&gt;steps to create account&lt;/u&gt;&lt;br&gt;
When you create a service account, you need to offer an alphanumeric ID (SA_NAME within the samples below), together with my-provider-account. The ID must be between 6 and 30 characters, and can contain lowercase alphanumeric characters and dashes. After you create a service account, you can't alternate its call.&lt;/p&gt;

&lt;p&gt;The carrier account's name seems within the electronic mail deal with that is provisioned at some stage in creation, inside the layout &lt;a href="mailto:SA_NAME@PROJECT_ID.Iam.Gserviceaccount.Com"&gt;SA_NAME@PROJECT_ID.Iam.Gserviceaccount.Com&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Each carrier account additionally has a everlasting, unique numeric ID, which is generated robotically.&lt;/p&gt;

&lt;p&gt;You also offer the subsequent statistics whilst you create a service account:&lt;/p&gt;

&lt;p&gt;SA_DESCRIPTION is an elective description for the provider account.&lt;br&gt;
SA_DISPLAY_NAME is a pleasant name for the provider account.&lt;br&gt;
PROJECT_ID is the ID of your Google Cloud challenge.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Pass service account json report as a argument to bigquery Client class&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;u&gt;&lt;strong&gt;Inserting new records in list format&lt;/strong&gt;&lt;/u&gt;&lt;br&gt;
The first way you can upload data is per row. Here, a list of tuples appends two new rows to the table ‘test_table_creation’ using the function .insert_rows()&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkxpls3khi0wfzxwoj7u4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkxpls3khi0wfzxwoj7u4.png" alt="Image description" width="679" height="375"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;u&gt;&lt;strong&gt;Insert into a Nested Table&lt;/strong&gt;&lt;/u&gt;&lt;br&gt;
Like above, when studying from a nested desk it’s additionally essential to deal with nested statistics unique additionally whilst putting information. In order to put in writing records into a unmarried nested desk, you could define a dictionary within the list that contains the nested statistics. The key of every entry then corresponds to the column call into which the statistics is to be inserted.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvbghh8pvdaf9gceqn4mf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvbghh8pvdaf9gceqn4mf.png" alt="Image description" width="682" height="286"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;u&gt;&lt;strong&gt;Upload csv into bigquery table&lt;/strong&gt;&lt;/u&gt;&lt;br&gt;
Now which you recognise how to import man or woman records into Big Query with Python, now we try the whole thing with a CSV. With the Pandas and CSV libraries we can first load information from CSV file.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1jhrehkhfb2x74h88tcq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1jhrehkhfb2x74h88tcq.png" alt="Image description" width="680" height="175"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;u&gt;Summary&lt;/u&gt;&lt;/strong&gt;&lt;br&gt;
Google BigQuery and Python—in this example the Cloud Datalab — is a very powerful toolset. Now you should know how to insert our records into BigQuery using Python. This could be useful for Data Analysts and Data Scientist who want to save their work in BigQuery and eventually visualize it. But also for Data Engineers who can realize data pipelines with Python. A special case is nested data, but since BigQuery works very well with it and often performs better, this topic should be familiar to you.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>JIRA ISSUE INFORMATION COLLECTION BY USING REQUESTS MODULE(PYTHON)</title>
      <dc:creator>Seenevasaraj</dc:creator>
      <pubDate>Thu, 01 Feb 2024 10:14:59 +0000</pubDate>
      <link>https://dev.to/seenevasaraj/jira-issue-information-collection-by-using-requests-modulepython-1gni</link>
      <guid>https://dev.to/seenevasaraj/jira-issue-information-collection-by-using-requests-modulepython-1gni</guid>
      <description>&lt;p&gt;Hey Reader,&lt;/p&gt;

&lt;p&gt;My name is Seenevasaraj, and I am working as Software Developer at Luxoft India. The various project at Luxoft, I am implementing automation in all viable way. Through this article I desired to provide an explanation for about automation which I have accomplished to generate excel document of JIRA issues by using python script.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;JIRA&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Issue Tracking: it's miles usually used for issue monitoring competencies. It lets in employer to create, tune, and manage problems, responsibilities, bugs, and other styles of work objects.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Project Management: JIRA helps venture control by means of permitting groups to devise, tune progress, and launch software program or complete tasks.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Script utilization&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Management not required to check all of the tasks manually to track productiveness.&lt;/li&gt;
&lt;li&gt;By this automation, we can make graph and tune progress of all troubles&lt;/li&gt;
&lt;li&gt;Management can make report of worker contribution and project deliveries through this automation.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;The configuration, required, within the Jira software program device:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  Create a Jira person account.&lt;/li&gt;
&lt;li&gt;  Create a site name, upload a assignment, and, document a few troubles, or, bugs. Our mission is to fetch, troubles records, the use of Python code.&lt;/li&gt;
&lt;li&gt;  We want to have, a valid token, for authentication, which can be acquired, from link  &lt;a href="https://identity.Atlassian.Com/manage/api-tokens"&gt;https://identity.Atlassian.Com/manage/api-tokens&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Module required in python:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;requests&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;requests module utilization:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The &lt;strong&gt;requests&lt;/strong&gt; is inbuild Python package for making HTTP requests to URL. Whether or not it's REST APIs or Web Scraping, requests are a should to be discovered for proceeding similarly with these technology. When one makes a request to URI, it returns a response. This package provide functionalities for coping with both the request and reaction&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Establishing connection with JIRA the usage of requests module in python script:
&lt;/h2&gt;

&lt;p&gt;&lt;u&gt;prerequisite&lt;/u&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Get api token from JIRA for authentication cause at the same time as making request. 
&lt;strong&gt;Procedure to create the API token&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;Click Profile at the right-hand aspect pinnacle nook, pick Personal Authentication Token option.&lt;/li&gt;
&lt;li&gt;Click Create token button.
&lt;/li&gt;
&lt;li&gt;On the API Token Creation Result pop-up, word down the token for destiny use and click on Close.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;u&gt;Making reference to JIRA&lt;/u&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Import requests module &lt;/li&gt;
&lt;li&gt;Start new consultation via initializing session class in requests module
&lt;strong&gt;Session class&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;A Session object is created the use of requests.Session().&lt;/li&gt;
&lt;li&gt;Using a consultation is in particular beneficial when making multiple requests to the equal server, because it allows you to persist certain parameters (inclusive of cookies) across those requests.
&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;

&lt;p&gt;Add your API token in session headers&lt;br&gt;
&lt;strong&gt;Session headers importance&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;User Agent Information: Many internet servers use the User-Agent header to perceive the purchaser (browser or utility) making the request. Some servers might also respond differently based totally at the consumer agent, and imparting a user agent facilitates mimic a specific browser or customer.&lt;/li&gt;
&lt;li&gt;Content Negotiation: The Accept header within the request may be used to suggest the preferred format of the reaction (e.G., JSON, XML, HTML). Servers may additionally respond with special content sorts based on the Accept header.&lt;/li&gt;
&lt;li&gt;Authentication: If the server requires authentication, you may need to include an Authorization header with the appropriate credentials.&lt;/li&gt;
&lt;li&gt;Cookies: Session headers often consist of cookies, allowing you to persist the session throughout more than one requests. The requests library robotically handles cookies when the usage of classes.&lt;/li&gt;
&lt;li&gt;Custom Headers: You may want to encompass custom headers primarily based at the requirements of the API or server you're interacting with.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;session.headers.update({'Authorization': f'Bearer {api_token}'})&lt;/strong&gt;&lt;/p&gt;


&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Once our session is up to date with authentication token, we will make URL requests to acquire data from JIRA&lt;br&gt;&lt;br&gt;
&lt;strong&gt;response = session.get('&lt;a href="https://jira.Devops.Jlr-apps.Com/relaxation/api/2/search',params="&gt;&lt;/a&gt;&lt;a href="https://jira.Devops.Jlr-apps.Com/relaxation/api/2/search',params="&gt;https://jira.Devops.Jlr-apps.Com/relaxation/api/2/search',params=&lt;/a&gt; {'jql': "task=project_name"},)&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;

&lt;p&gt;Check response object to confirm whether we are getting right output or not.&lt;br&gt;
&lt;strong&gt;print(response.status_code)&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;Some of crucial HTTP reaction code&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;2 hundred OK: Standard response for successful HTTP requests.&lt;/li&gt;
&lt;li&gt;400 Bad Request: The server can't or will no longer process the request because of &lt;/li&gt;
&lt;li&gt;401 Unauthorized: Similar to 403 Forbidden, but mainly for authentication.&lt;/li&gt;
&lt;li&gt;500 Internal Server Error: A frequent error message indicating that the server has encountered an sudden situation.&lt;/li&gt;
&lt;li&gt;503 Service Unavailable: The server is not geared up to handle the request.&lt;/li&gt;
&lt;li&gt;429 Too Many Requests: This fame code indicates that the consumer has despatched too many requests in a given amount of time&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Reading records from response
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;At every request, consumer can get maximum one thousand issue info from JIRA server. So if assignment have extra than 1000 troubles, person wishes to make request to server with extra parameter.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;**params = {&lt;br&gt;
            'jql': "task=project_name",&lt;br&gt;
            'startAt':starting_position, #assign fee according to new starting point after reading a thousand troubles&lt;br&gt;
            'maxResults': -1,}&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    response = session.get('https://jira.Devops.Jlr-apps.Com/relaxation/api/2/search', params=params)**
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;ul&gt;
&lt;li&gt;User can access the issue from response with the aid of calling json method
&lt;strong&gt;data = response.json()&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;User can acquire data of issue via &lt;strong&gt;data['issues']&lt;/strong&gt; &lt;/li&gt;
&lt;li&gt;Iterate issue listing and gather data based JIRA on attribute names
&lt;u&gt;example&lt;/u&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcaa1xeho4mv5awbicrxm.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcaa1xeho4mv5awbicrxm.png" alt="Image description" width="671" height="187"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Conclusion:&lt;/strong&gt;&lt;br&gt;
In this Automation I have used requests module, but another third party module called jira is available in pip. But jira package has some limitation, I will publish another article about jira module and it's limitation compared to requests module.&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
