<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Aladeusi Olawale A on Medium]]></title>
        <description><![CDATA[Stories by Aladeusi Olawale A on Medium]]></description>
        <link>https://medium.com/@olawalequest?source=rss-f8aa1bcd58ad------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*4dU0rl-YWXke1FGKj3z3Ug.jpeg</url>
            <title>Stories by Aladeusi Olawale A on Medium</title>
            <link>https://medium.com/@olawalequest?source=rss-f8aa1bcd58ad------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 03 Dec 2026 14:15:07 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@olawalequest/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Building a RESTful Blog APIs using python and flask — Part 2]]></title>
            <link>https://medium.com/@olawalequest/building-a-restful-blog-apis-using-python-and-flask-part-2-83f74f74b3c9?source=rss-f8aa1bcd58ad------2</link>
            <guid isPermaLink="false">https://medium.com/p/83f74f74b3c9</guid>
            <category><![CDATA[flask]]></category>
            <category><![CDATA[api]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[sqlalchemy]]></category>
            <dc:creator><![CDATA[Aladeusi Olawale A]]></dc:creator>
            <pubDate>Sat, 28 Jul 2018 14:52:50 GMT</pubDate>
            <atom:updated>2018-07-28T14:52:50.617Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FywOXK4yz5H0Me8kLEea5Q.jpeg" /></figure><p>In part 1, we covered how to create a simple RESTful API with four basic <strong>CRUD</strong> operation and Authentication using Flask. We learned about configuring Flask environment, creating models, making and applying migrations to the DB, grouping resources using flask blueprint, validating the authenticity of a user using JWT token.</p><p>In this part, we will build the remaining four endpoints for blogpost resource</p><h3>Blogpost API</h3><p>The following endpoints will be created</p><ul><li>Create a Post — POST api/v1/blogposts</li><li>Get All Posts — GET api/v1/blogposts</li><li>Get A Post — GET api/v1/blogposts/&lt;int:blogpost_id&gt;</li><li>Update A Post — PUT api/v1/blogposts/&lt;int:blogpost_id&gt;</li><li>Delete A Post — DELETE api/v1/blogposts/&lt;int:blogpost_id&gt;</li></ul><h3>Create a Blogpost — POST api/v1/blogposts</h3><p>Open /src/views/BlogpostView.py and add the following code</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/d3e617952b0912fcf1d4ea1430182feb/href">https://medium.com/media/d3e617952b0912fcf1d4ea1430182feb/href</a></iframe><p>In the above code, we added a new endpoint POST /api/v1/blogpost that would allow a user to create a new blogpost. Noticed with added @Auth.auth_required decorator to create() function to make sure only authenticated users can access the route. We also set up blogpost_api blueprint so that we can group all blogpost endpoints in the same resource.</p><p>Let’s test this endpoint on postman</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IHbX86EU81mNZUIs1PIFbw.png" /></figure><p>Don’t forget to add api-token to the header since we are only permitting registered users to create a post</p><h3>Get All Blogposts — GET api/v1/blogposts</h3><p>Get all blogpost endpoint will get all available blogpost in the system<br> Let’s add a new function to /src/views/BlogpostView.py and call it get_all</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/71a8c0c028e2627b05c12b020dd0ff88/href">https://medium.com/media/71a8c0c028e2627b05c12b020dd0ff88/href</a></iframe><p>You’ll notice we did not add @Auth.auth_required decorator to get_all, that is because we want to make that endpoint available to everybody - of course, you don&#39;t want to be the only one to read your posts :)</p><p>Test on postman</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*v5qSJmKRhCp-OEABTzzAMg.png" /></figure><h3>Get A Blogpost — GET api/v1/blogposts/&lt;int:blogpost_id&gt;</h3><p>This endpoint will get a single blogpost by it’s id. Just like Get all endpoint, we&#39;ll also make this available for everybody - registered users or unregistered users.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/5266510a1b60129cbdf134394e552bc8/href">https://medium.com/media/5266510a1b60129cbdf134394e552bc8/href</a></iframe><p>Test on postman</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wAJi63iuEM8EIvwlGae5vg.png" /></figure><h3>Update A Blogpost — PUT api/v1/blogposts/&lt;int:blogpost_id&gt;</h3><p>Something to note before we create this endpoint</p><ul><li>Only registered users can access this endpoint</li><li>Users can only update their own blogpost</li><li>A user can not update another user’s blogpost<br> To do this, let’s create a new function and add @Auth.auth_required decorator and also add a condition that checks if the post owner_id is equal to the current user&#39;s id. If the owner_id is equal to user_id then go ahead and update the post, if not return an error back to the user</li></ul><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/6e02b5c4e7a25d971268ab8b3694fcc9/href">https://medium.com/media/6e02b5c4e7a25d971268ab8b3694fcc9/href</a></iframe><p>Test on postman</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hqplTCbmf-qfwlzmzueSaQ.png" /></figure><h3>Delete A Blogpost — DELETE api/v1/blogposts/&lt;int:blogpost_id&gt;</h3><p>This endpoint will allow a user to delete only their own post — meaning a user cannot delete another user’s post.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/21186376d747507cce56bfa46c43eb38/href">https://medium.com/media/21186376d747507cce56bfa46c43eb38/href</a></iframe><p>Test on postman</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NoEgXhRlNg8tnp5NUdFjFg.png" /></figure><h3>CONCLUSION</h3><p>This part covers the creation of create, get all, get one, update and delete endpoints. We make get all and get one endpoints accessible to everyone and also added condition to delete and update endpoints so that a user can only update or delete their own post.</p><p>In part 3 of this series, we’ll learn how to setup unit test for our app and also host the app on heroku — you can call it 2 in 1 pack.</p><p>If you’ve not read PART 1, click <a href="https://www.codementor.io/olawalealadeusi896/restful-api-with-python-flask-framework-and-postgres-db-part-1-kbrwbygx5">here</a><br> Click <a href="https://github.com/olawalejarvis/blog_api">here</a> to check out the project on Github</p><blockquote>To be a programmer is to develop a carefully managed relationship with error. There’s no getting around it. You either make your accommodations with failure, or the work will become intolerable — Ellen Ullman</blockquote><p>Drop your questions or comment, also don’t forget to like this post if you learned one or two things by reading it.</p><p><em>Originally published at </em><a href="https://www.codementor.io/olawalealadeusi896/building-a-restful-blog-apis-using-python-and-flask-part-2-l9y8awusp"><em>www.codementor.io</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=83f74f74b3c9" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Building a RESTful Blog APIs using python and flask — Part 1]]></title>
            <link>https://medium.com/@olawalequest/building-a-restful-blog-apis-using-python-and-flask-part-1-2be27e863f99?source=rss-f8aa1bcd58ad------2</link>
            <guid isPermaLink="false">https://medium.com/p/2be27e863f99</guid>
            <category><![CDATA[postgresql]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[restful]]></category>
            <category><![CDATA[api]]></category>
            <category><![CDATA[flask]]></category>
            <dc:creator><![CDATA[Aladeusi Olawale A]]></dc:creator>
            <pubDate>Tue, 03 Jul 2018 16:38:12 GMT</pubDate>
            <atom:updated>2018-07-03T16:38:12.170Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/900/1*j2ZbVS-M8zsgprHt6vZR6w.jpeg" /></figure><blockquote><em>To be a programmer is to develop a carefully managed relationship with error. There’s no getting around it. You either make your accommodations with failure, or the work will become intolerable — Ellen Ullman</em></blockquote><p>In this series, I’m going to take you through a very easy to learn path in creating RESTFUL API using Python and Flask micro-framework.</p><p>Let’s get started with some background context</p><h3>WHAT IS RESTFUL API?</h3><p>A RESTful API(Application Programming Interface) is an approach based on <strong>REST</strong>(<strong>RE</strong>presentational <strong>S</strong>tateless <strong>T</strong>ransfer) technology. REST is an architectural style and approach to communications in web services development that defines a set of constraint and properties based on HTTP protocols which include GET, POST, PUT and DELETE. I’m not going to dive deep into the details about REST in this article, but you can read more about REST <a href="https://en.wikipedia.org/wiki/Representational_state_transfer">here</a></p><h3>WHAT IS PYTHON?</h3><p><a href="https://www.python.org/about/">Python</a> is a programming language that lets you work more quickly and integrate your systems more effectively.</p><h3>WHAT IS FLASK?</h3><p><a href="http://flask.pocoo.org/">Flask</a> is a micro web framework written in Python. It is called a micro-framework because it does not require any specific libraries or tools.</p><h3>What we’ll build?</h3><blockquote><em>First, solve the problem. Then write the code — JOHN JONHSON</em></blockquote><p>In this series, we’re going to develop a blog RESTFul API service, which will allow all the four basic CRUD(<strong>C</strong>reate, <strong>R</strong>ead, <strong>U</strong>pdate and <strong>D</strong>elete) operations.<br> The service will have the following endpoints(An endpoint is a URL pattern used to communicate with an API);</p><ul><li><strong>POST</strong> /api/v1/users — create a user(CREATE)</li><li><strong>GET</strong> /api/v1/users — get all registered users(READ)</li><li><strong>GET</strong> /api/v1/users/&lt;user_id&gt; — get a user(READ)</li><li><strong>GET</strong> /api/v1/users/me — get my info(READ)</li><li><strong>PUT</strong> /api/v1/users/me — update my account(UPDATE)</li><li><strong>DELETE</strong> /api/v1/users/me — Delete my account(DELETE)</li><li><strong>POST</strong> /api/v1/blogs — Create a blog post(CREATE)</li><li><strong>GET</strong> /api/v1/blogs — Get all blog post(READ)</li><li><strong>GET</strong> /api/v1/blogs/&lt;blog_id&gt; — Get a single blog post(READ)</li><li><strong>PUT</strong> /api/v1/blogs/&lt;blog_id&gt; — Update a blog post(UPDATE)</li><li><strong>DELETE</strong> /api/v1/blogs/&lt;blog_id&gt; — Delete a blog post(DELETE)</li></ul><h3>Pre-requisites</h3><p>Make sure you have the following installed on your system</p><ul><li><a href="https://www.python.org/downloads/">Python3.x</a> — We’ll use python 3.XX for the blog service project</li><li><a href="https://www.postgresql.org/download/">PostgreSQL</a> — We’ll use postgreSQL relational database for this project</li><li><a href="https://docs.pipenv.org/">Pipenv</a> — we’ll use pipenv to create and manage our project virtual environment and to also install and uninstall packages</li></ul><p>Run the following commands to check if you have the above installed on your system</p><pre>$ python --version <br>$ which psql<br>$ pipenv --version</pre><p>You should see something similar to this</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HxDGEY04rRfFVum7vbO2ag.png" /></figure><h3>Setting up project virtual environment using pipenv</h3><p>Install <strong>pipenv</strong> if you don’t already have it installed on your system using pip or if you’re using a mac system using brew</p><pre>$ pip install pipenv</pre><p><strong>OR</strong></p><pre>$ brew install pipenv</pre><p>Let’s create our project’s directory and name it <strong>blog_api</strong><br> open your terminal and run the following command to create blog_api directory</p><pre>$ mkdir blog_api</pre><p>Change your working directory to the directory you just created above and run pipenv command to setup project virtual environment</p><pre>$ cd blog_api<br>$ pipenv --three</pre><p>Running pipenv --three will create a virtual environment if not already created using python3 - Read pipenv documentation <a href="https://docs.pipenv.org/">here</a> to learn more about how it works</p><p><strong>NOTE</strong>: we will be using python 3.xx in this project</p><p>So you may ask, why do we need a virtual environment in Python? using a virtual environment for python projects allows us to have an isolated working copy of python which gives us the opportunity to work on a specific project without worry of affecting other projects.</p><p>Activate the project virtual environment with the following command</p><pre>$ pipenv shell</pre><h3>Installing Project Dependencies</h3><p>The following are the required package dependencies we’ll use to develop our blog API service</p><ul><li><a href="http://flask.pocoo.org/">flask</a> — Flask is a microframework for Python based on Werkzeug, Jinja 2 and good intentions</li><li><a href="http://flask-sqlalchemy.pocoo.org/">flask sqlalchemy</a> — flask wrapper for Sqlalchemy, it adds Sqlalchemy support to flask apps</li><li><a href="https://pypi.org/project/psycopg2/">psycopg2</a> — python postgresql adapter that provides some commands for simple <strong>CRUD</strong> queries and more on postgresql db</li><li><a href="https://flask-migrate.readthedocs.io/en/latest/">flask-migrate</a> — flask extension that handles SQLAlchemy database migration. Migration basically refers to the management of incremental, reversible changes to relational database schemas</li><li><a href="http://flask-script.readthedocs.io/en/latest/">flask-script</a> — provides an extension for managing external scripts in flask. This is needed in running our db migrations from the command line</li><li><a href="http://marshmallow.readthedocs.io/en/latest/">marshmallow</a> — marshmallow is a library for converting complex datatypes to and from native Python datatypes. Simply put it is used for deserialization(converting data to application object) and serialization(converting application object to simple types).</li><li><a href="http://flask-bcrypt.readthedocs.io/en/latest/">flask-bcrypt</a> — we’ll use this to hash our password before saving it in the db — of course, you don’t want to save user’s password directly into your db without hashing it</li><li><a href="https://pyjwt.readthedocs.io/en/latest/">pyjwt</a> — python library to encode and decode JSON Web Tokens — We will use this token in verifying user’s authenticity</li></ul><p>Run the following command to install all the dependencies;</p><pre>$ pipenv install flask flask-sqlalchemy psycopg2 flask-migrate flask-script marshmallow flask-bcrypt pyjwt</pre><p>currently, your project directory should look like this</p><pre>blog_api/<br>  |-Pipfile<br>  |-Pipfile.lock</pre><p>Pipfile contains information about your app including all the app prod and dev dependencies.</p><p>Your Pipfile should contain the following;</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/0da16ed595286a816ed1d4d31301cdad/href">https://medium.com/media/0da16ed595286a816ed1d4d31301cdad/href</a></iframe><h3>File structures</h3><p>Create the following file structure for your project<br> <strong>NOTE:</strong> Do not change Pipfile and Pipfile.lock, leave it as it is</p><pre>blog_api/<br>  |-src<br>    |- __init__.py<br>    |- shared<br>      |- __init__.py<br>      |- Authentication.py<br>    |- models<br>      |- __init__.py<br>      |- UserModel.py<br>      |- BlogpostModel.py<br>    |- views<br>      |- __init__.py<br>      |- UserView.py<br>      |- BlogpostView.py<br>    |- app.py<br>    |- config.py<br>    |- manage.py<br>    |- run.py<br>    |- Pipfile<br>    |- Pipfile.lock</pre><h3>Create app db</h3><p>Let’s create our db and name it <strong>blog_api_db</strong><br> You can use createdb command</p><pre>$ createdb blog_api_db</pre><p>OR create your db using any PostgreSQL client application e.g <a href="https://eggerapps.at/postico/">Postico</a>, <a href="https://www.pgadmin.org/">pgadmin</a> etc.</p><h3>Flask Environment Configuration</h3><p>Now, let’s set up the configurations that would be required by our application.</p><p>Add the following inside /src/config.py</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/9836a6ebac56410c52dd8a5207b05b81/href">https://medium.com/media/9836a6ebac56410c52dd8a5207b05b81/href</a></iframe><p>What we did?<br>We created two classes Development — which contains development environment configs and Production — which contains production environment configs. For this project, I don&#39;t want to go too complex with these configurations, so I only specified DEBUG, TESTING, JWT_SECRET_KEY, and SQLALCHEMY_DATABASE_URI options, you can read more about handling flask configurations and others <a href="http://flask.pocoo.org/docs/1.0/config/">here</a>.<br> For our blog service, there&#39;re some values we don&#39;t want to expose to the outside world, one of it is JWT_SECRET_KEY which we will use later to sign user&#39;s token. This should be a secret key and as such should only be known to us - for this reason and more those secret variables need to be set in our system environment. You&#39;ll notice we did JWT_SECRET_KEY = os.getenv(&#39;JWT_SECRET_KEY&#39;) in our config file, we imported os and use it to get JWT_SECRET_KEY value from the system environment.</p><p>Run the following from your terminal to set system environment variables</p><pre>$ export FLASK_ENV=development<br>$ export DATABASE_URL=postgres://name:password@houst:port/blog_api_db<br>$ export JWT_SECRET_KEY=hhgaghhgsdhdhdd</pre><p>Note: change the DATABASE_URL value to your database url, also change JWT_SECRET_KEY value to whatever you want to use as your secret key, you&#39;ll need this later to sign in user&#39;s token.</p><h3>Create App</h3><p>Let’s create our app with a sample API endpoint, add the following in src/app.py file</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/f37fe818e9cac39179003eb923e0f821/href">https://medium.com/media/f37fe818e9cac39179003eb923e0f821/href</a></iframe><p>What we did?<br>create_app function takes in env_name(env_name is the name of the environment we want to run our flask app on, it can be testing, development or production), this is needed to load our environment configuration. Don&#39;t forget we had already set up our environment configuration object in src/config.py file. create_app returns a new flask app object. We also set up a simple endpoint / with HTTP GET method, a request to this endpoint will return Congratulations! Your first endpoint is working.</p><p>Now that we have created our app, let create an entry point for our app</p><p>add the following code to /run.py file in the project root directory. Create run.py file in the project root directory if you don&#39;t have it already.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/2b2050ebf6fac604a5574eb29355529a/href">https://medium.com/media/2b2050ebf6fac604a5574eb29355529a/href</a></iframe><p>What we did?<br>Here we imported create_app() function from <em>src/app</em> and call the function by passing our environment name(in this case &quot;development&quot;). Don&#39;t forget that create_app() functions return a flask object, in this case, we name the object <strong><em>app</em></strong>. Before we called create_app() function, we added a condition that checks if the python file name is the same as the file main name, if they&#39;re the same we run our app by calling flask run() method and if not we do nothing.</p><p>Now let’s run our app</p><p>We can achieve this by running the below command from the terminal</p><pre>$ python run.py</pre><p>You should get something similar to below if all went well</p><pre>* Serving Flask app &quot;src.app&quot; (lazy loading)<br>* Environment: development<br>* Debug mode: on<br>* Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)<br>* Restarting with stat<br>* Debugger is active!<br>* Debugger PIN: 300-081-843</pre><p>Note that the app is running on port 5000, that is the default port number from flask. You can change the default port number to whatever you want by passing port parameter to the run() method - in our run.py code just change app.run() to app.run(port=&lt;new_port_number_here&gt;).</p><p>Now let see if our sample endpoint is working</p><p>Run http://127.0.0.1:5000/ on your browser</p><p>If all went well you should see “Congratulations! Your first endpoint is working” from the browser</p><h3>Database Models</h3><p>A model determines the logical structures of a database. Simply put, it determines how tables would look like on the database. Models define how records can be manipulated or retrieved in the database.</p><p>We’ll create two models for our project</p><ul><li>User Model and</li><li>Blogpost Model</li></ul><p>Our models class will inherit Model object from flask-sqlalchemy, Flask Sqlalchemy is a flask wrapper for Sqlalchemy. Sqlalchemy is an <strong>ORM</strong>(Object Relational Mapper). An <strong>ORM</strong> is a database sql abstraction that makes it easy to carry out sql operations on relational database. With ORM, instead of writing raw sql queries (e.g to retrieve all rows from our User&#39;s table) we could do something like - model.query.all().</p><p>Add the following to src/models/__init__.py</p><pre>#src/models/__init__.py<br>from flask_sqlalchemy import SQLAlchemy<br># initialize our db<br>db = SQLAlchemy()</pre><p>What we did?<br> Here we imported SQLAlchemy from flask_sqlalchemy and initialize our db</p><p>Next, let create User and Blogpost Model<br>User Model will have the following fields</p><pre>* id<br>* name<br>* email<br>* password<br>* created_at<br>* modified_at</pre><p>While Blogpost Model will have the following fields</p><pre>* id<br>* title<br>* contents<br>* owner_id<br>* created_at<br>* modified_at</pre><p>Add the following code to src/models/UserModel</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/6bcfee4d47bae28c278aa4da03824583/href">https://medium.com/media/6bcfee4d47bae28c278aa4da03824583/href</a></iframe><p>What we did?</p><ul><li>We imported db instance from src/models/__init__.py</li><li>Our UserModel class inherited from db.Model</li><li>we named our table users - __tablename__ = &#39;users&#39;</li><li>We defined user’s table columns and assigned rules to each column, we assigned primary_key rule to id, unique rule to email field, and set not null rule to email, password and name, those fields are compulsory.</li><li>save() method will be use to save users to our db</li><li>update() method will be use to update our user&#39;s record on the db</li><li>delete() method will be use to delete record from the db</li><li>we added three additional static methods get_all_users(), get_one_user() and get_user_by_email(v) - as their names depicts to get all user from the db and to get a single user from the db using primary_key field and email field</li><li>__repl__() will return a printable representation of UserModel object, in this case we&#39;re only returning the id</li><li>__init__() is the class constructor and we used it set the class attributes</li></ul><p>One more thing to add to our user’s model, we need to hash user’s password before saving it into the db. Why do we need to hash user’s password? Because we don’t want to save raw user’s password to the db for security reason. This is where we will use flask-bcrypt module we installed in <a href="https://medium.com/p/2be27e863f99/#bd68"><strong>Installing Project Dependencies</strong></a></p><p>Add the following to /src/models/__init__.py</p><pre>from flask_bcrypt import Bcrypt<br>#######<br># existing code remains #<br>#######<br>bcrypt = Bcrypt()</pre><p>What we did?<br> Here we imported Bcrypt from flask_bcrypt and intialize it in this src/models/__init__.py file.</p><p>Next, we need to make some changes to password field in our UserModel</p><p>Add the following to src/models/UserModels.py</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/873dc4372ce43fc45f9c15faa82f8158/href">https://medium.com/media/873dc4372ce43fc45f9c15faa82f8158/href</a></iframe><p>What we did?<br> We made changes to UserModel to allow hashing of user’s password,</p><ul><li>We added two new methods to UserModel __generate_hash() and check_hash(), we&#39;ll use __generate_hash() to hash user&#39;s password before saving it into the db while check_hash() will be use later in our code to validate user&#39;s password during login.<br> Noticed we also set self.password = self.__generate_hash(data.get(&#39;password&#39;)) in our class constructor, this will make sure we generate hash for passwords before saving them into db. We also added a condition to our update() method that checks a user wants to update their password and hash it if yes.</li></ul><p>Now, let’s create our blogpost model</p><p>copy the following to src/models/BlogpostModel.py</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/c50a58b7c850e0f83bf95b3bc99dabc3/href">https://medium.com/media/c50a58b7c850e0f83bf95b3bc99dabc3/href</a></iframe><p>What we did?</p><ul><li>We imported our db instance from src/models/__init__.py</li><li>our BlogpostModel class inherited from db.Model</li><li>we named our table blogposts - __tablename__ = &#39;blogposts&#39;</li><li>We defined our blogpost’s table columns and assigned rules to each column, we assigned primary_key rule to id, and set not null rule to title, and contents, of course we don&#39;t want those fields to be empty.</li><li>save() method will be used to save blogpost to our db</li><li>update() method will be used to update our blogpost&#39;s record on the db</li><li>delete() method will be used to delete a record from blogpost&#39;s table on the db</li><li>we added two static method get_all_blogposts() and get_one_blogpost(), as their names depicts to get all blogposts and to get a single blogpost from the db</li><li>__repl__() will return a printable representation of BlogpostModel object, in this case, we&#39;re only returning the id</li><li>__init__() is the class constructor and we use it set the class attributes</li></ul><p>Now, we need to define the relationship between our two tables users and blogposts table. A user can have many blogpost, so the relationship between users table and blogposts table will be one-to-many.<br> We also need to define our model&#39;s schema, remembered we installed marshmallow from <a href="https://medium.com/p/2be27e863f99/#bd68"><strong>Installing Project Dependencies</strong></a> section, here is where we&#39;ll use it.</p><p>let’s update our UserModel and BlogpostModel, add the following</p><p>UserModel</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/8c221fcf80c291a231666b2f324780bb/href">https://medium.com/media/8c221fcf80c291a231666b2f324780bb/href</a></iframe><p>BlogpostModel</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/9a0adbead07603437414da7f991eee88/href">https://medium.com/media/9a0adbead07603437414da7f991eee88/href</a></iframe><p>What we did?</p><ul><li>We added owner_id field to BlogpostModeland we linked it to our users&#39; table with a ForeignKey. blogposts field was added to UserModel with some rules that will allow us to get every blogposts owns by a user when querying UserModel.</li></ul><p>Next, we need to wrap db and bcrypt with app<br> Update /src/app.py with the following code</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/9efe2cb414e7bf4b216c1e96f0dfeecf/href">https://medium.com/media/9efe2cb414e7bf4b216c1e96f0dfeecf/href</a></iframe><p>We import db and bcrypt from src/model and initialized it</p><h3>Migrations</h3><p>Database migration refers to the management of incremental, reversible changes to relational database schemas. Simply put, migrations is a way of updating our db with the changes we made to our models. Since we had already set up our models, now we need to migrate our models changes to the db.</p><p>Add the following code to /manage.py</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/1cfda8090f72db782810cdadaa8906b2/href">https://medium.com/media/1cfda8090f72db782810cdadaa8906b2/href</a></iframe><p>What we did?</p><p>We set up a migration script that will help in the maintenance of our migrations.</p><p>The Manager class keeps track of all the commands and handles how they are called from the command line. The MigrateCommand contains a set of migration commands such as init, migrate, upgrade etc. we will use these commands now.</p><p>Next, let’s run migrations initialization with db init command</p><pre>$ python manage.py db init</pre><p>You should see the following after running the above script</p><pre>Creating directory /&lt;path&gt;/blog_api/migrations ... done Creating directory /&lt;path&gt;/blog_api/migrations/versions ... done Generating /&lt;path&gt;/blog_api/migrations/script.py.mako ... done Generating /&lt;path&gt;/blog_api/migrations/env.py ... done Generating /&lt;path&gt;/blog_api/migrations/README ... done Generating /&lt;path&gt;/blog_api/migrations/alembic.ini ... done Please edit configuration/connection/logging settings in &#39;/&lt;path&gt;/blog_api/migrations/alembic.ini&#39; before proceeding.</pre><p>This will create a new migration sub-folder in the project directory</p><p>Now, run this script which will populate our migrations files and generate users and blogposts tables with our model changes</p><pre>$ python manage.py db migrate</pre><pre>INFO [alembic.runtime.migration] Context impl PostgresqlImpl. INFO [alembic.runtime.migration] Will assume transactional DDL. INFO [alembic.autogenerate.compare] Detected added table &#39;users&#39; INFO [alembic.autogenerate.compare] Detected added table &#39;blogposts&#39; Generating /&lt;path&gt;/blog_api/migrations/versions/e23b7256bd81_.py ... done</pre><p>Next, apply the changes to the db by running the following command</p><pre>$ python manage.py db upgrade</pre><p>To confirm if the tables were created in the db, you can use psql command, check this out</p><h3>User API</h3><p>Our User API will have all the four CRUD operation,<br>We’ll start by creating create user endpoint. When a user creates an account, we want to return back to the user a JWT token that will be used for any authentication request.<br>Let&#39;s jump back to our code</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/b15b7832e8641ca33400063877a66950/href">https://medium.com/media/b15b7832e8641ca33400063877a66950/href</a></iframe><p>What we did?</p><ul><li>We imported request - this contains all the request info from the user including headers, body, and other information, json - to serialize JSON output, Response - we need this to build our response object and Blueprint- we need this to group our user resources together from flask.</li><li>We created a blueprint app that we’ll use for all user resources and we name it user_api</li><li>We created create() with user_api.route() operator, with this operator we defined our create endpoint as / and POST request type. create() will only accept a POST request and returned back JWT token if the request was successful. We use this UserModel.get_user_by_email(data.get(&#39;email&#39;)) to check if the email that the user supplied already exist in our db, if the query returns an empty object, that means that email does not exist and will go ahead and save the user in the db. if the user does exist, we returned back an error message telling the user to use another email. Remembered we defined our email field to be unique in UserModel</li><li>request.get_json() to get the JSON object from the body of the request, we use this user_schema.load(req_data) to vaidate and deserialize input json data from the user, remembered we defined UserSchema class in our UserModel model.</li><li>We also imported Auth from .shared.Authentication, we use Auth to generate user&#39;s token and it will be use later to decode user&#39;s token.</li></ul><p>Next, let define Auth class.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/274e8d63b2533339093e3038647ddb8a/href">https://medium.com/media/274e8d63b2533339093e3038647ddb8a/href</a></iframe><p>What we did?</p><ul><li>We imported jwt and set up generate_token static method that takes in user_id and use that in our payload to generates JWT token. We also set the token exp date to be 1 day after it&#39;s creation. We use JWT_SECRET_KEY already set in our system environment to sign the token with HS256 algorithm.</li><li>We use decode_token() static method to decode supplied user&#39;s token using the same JWT_SECRET_KEY we used in signing the token. The method checks and validates the token, we&#39;ll need this later in our project.</li></ul><p>Next, let’s set up another route to get all user’s in the db. We want to do this in such a way that only registered user can get all users, meaning a user without an auth token cannot access this route. A user can only get a token when they create an account(this will only happen once) and subsequent login to the service. To achieve this we need to set up a decorator, let&#39;s call it auth_required, we also need to set up user login route.</p><ul><li>auth_requred decorator<br> let’s go back and edit our Authentication class to include auth_decorator</li></ul><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/943eb87c14143acd0267e0ca2b9e6f6d/href">https://medium.com/media/943eb87c14143acd0267e0ca2b9e6f6d/href</a></iframe><p>What we did?</p><ul><li>We added a new static method auth_required to Authentication class and we wrapped it using wraps imported from python functools. we set up a condition that checks if api-token exist in the request header, a user will need to attached the token gotten from creating an account or the one gotten from logging in. If the token exist from the request header, we passed the token to decode_token method to validate the authenticity of the token, if the token is valid, we get the payload data which is the user_id and save it to g, g is a global variable in flask that is valid till we finished processing a request. We will use that later to get current user&#39;s information. We returned back to the user an error message if the token is not valid.</li><li>Login endpoint — We need to set up this here so that a user can get a token</li></ul><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/bb57a16041cfd5d06f65631d89af19e5/href">https://medium.com/media/bb57a16041cfd5d06f65631d89af19e5/href</a></iframe><p>What we did?</p><ul><li>We added a new method login and assigned /login route with request type POST to user view. request.get_json() was used to get the request body data and we passed it to our user_schema.load(req_data, partial=True) to deserialized and validate the content of the data, we passed in partial=True to our schema since login does not require name field which is required if a user wants to create an account. Check <a href="http://marshmallow.readthedocs.io/en/latest/">here</a> to read more about how marshmallow schema works.</li><li>We use UserModel.get_user_by_email(data.get(&#39;email&#39;)) to filter the user&#39;s table using the user email address and return an error message if the user does not exist. If the user does exist in the db, we added a condition to validate the supplied password with the user&#39;s saved hash pasword using user.check_hash(data.get(&#39;password&#39;)), remembered we added check_hash() method to our UserModel when we created it. If the password matches, then we generate and return a token to the user. The token will be used in any subsequent request.</li></ul><p>Now, let jump back to creating the endpoint that will get all user’s data on the db and only a user with a valid token will be able to access this route.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/76e929cb1e3452e0130c9bafcac75fb4/href">https://medium.com/media/76e929cb1e3452e0130c9bafcac75fb4/href</a></iframe><p>What we did?</p><ul><li>Set up a new method get_all with endpoint / and request method GET, we use UserModel.get_all_users() to query user&#39;s table on the db and returned all user&#39;s data. We also attached @Auth.auth_required decorator to validate the authenticity of the user making the request.</li></ul><p>Finally, to complete our user APIs, let add get — GET, update - PUT and delete - DELETE a single user endpoints.<br> Note: A user can only update and delete their own account.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/c80d96fde77fafde4d662e4183c7aa07/href">https://medium.com/media/c80d96fde77fafde4d662e4183c7aa07/href</a></iframe><p>What we did?</p><ul><li>We added four more endpoints to get, update and delete the current user, and the fourth one to get a user information through their id.</li></ul><p>Finally, let’s register user_api blueprint in app, as it is currently, app does not know that user_api blueprint exist.<br> To register it, add the following to app.py</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/ff394022f4b63945597963fc54a1510a/href">https://medium.com/media/ff394022f4b63945597963fc54a1510a/href</a></iframe><p>What we did?<br>We imported user_api as user_blueprint from .views.UserView and registered the blueprint using app.register_blueprint(user_blueprint, url_prefix=&#39;/api/v1/users&#39;) with prefix /api/v1/users and the blueprint name.</p><h3>RUN</h3><p>let’s run our code before we complete this part.<br>To test the endpoint you can use <a href="https://www.getpostman.com/"><strong>POSTMAN</strong></a> or any other app</p><ul><li>Create User POST api/v1/users</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jd4DEnSHQMDFl9aUpvEl9w.png" /></figure><ul><li>Login POST api/v1/users/login</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mBevK7EYnhMW2rRLRVtXgg.png" /></figure><ul><li>Get Me GET api/v1/users/me<br>copy the jwt-token returned from the login call and put it in this request header api-token as key</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XrHSNWPwLydOggyLLHlUmA.png" /></figure><ul><li>Edit Me PUT api/v1/users/me<br>using the same token as above</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QTHwPTzQ1r56TDfHzEqTDg.png" /></figure><ul><li>Get all users GET api/v1/users<br> using the same token</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*U-54I9z0ZeNVFZkWPcBl5g.png" /></figure><p>And finally, delete DELETE api/v1/users/me</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rpdrpv7RuyrwFCGDA7Ykog.png" /></figure><h3>CONCLUSION</h3><p>We’ve covered quite a lot on how to create a simple RESTful API that has the four basic <strong>CRUD</strong> operation with Authentication using Flask. We learned about configuring our Flask environment, creating models, making and applying migrations to the DB, grouping resources using flask blueprint, validating the authenticity of a user using JWT token and we also complete setting up all our user’s endpoints<br> We were able to set up the following endpoint;</p><ul><li>Create User — POST api/v1/users</li><li>Login User — POST api/v1/users/login</li><li>Get A User Info — GET api/v1/users/&lt;int:user_id&gt;</li><li>Get All users — GET api/v1/users</li><li>Get My Info — GET api/v1/users/me</li><li>Edit My Info — PUT api/v1/users/me</li><li>DELETE My Account — DELETE api/v1/users/me</li></ul><p>In Part 2 of this Series, we’ll complete setting up blogpost endpoint. Click <a href="https://github.com/olawalejarvis/blog_api">here</a> to checkout the project on Github.</p><p>Feel free to drop your questions if any, or drop a comment, I’ll be happy to respond to them.</p><p><em>Originally published at </em><a href="https://www.codementor.io/olawalealadeusi896/restful-api-with-python-flask-framework-and-postgres-db-part-1-kbrwbygx5"><em>www.codementor.io</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2be27e863f99" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ANDELA TAKEAWAYS: Expectation and Plan]]></title>
            <link>https://medium.com/@olawalequest/andela-takeaways-expectation-and-plan-46ebe218ff0d?source=rss-f8aa1bcd58ad------2</link>
            <guid isPermaLink="false">https://medium.com/p/46ebe218ff0d</guid>
            <category><![CDATA[andela-bootcamp]]></category>
            <category><![CDATA[andela]]></category>
            <dc:creator><![CDATA[Aladeusi Olawale A]]></dc:creator>
            <pubDate>Wed, 09 Nov 2016 07:57:27 GMT</pubDate>
            <atom:updated>2016-11-09T07:57:27.385Z</atom:updated>
            <content:encoded><![CDATA[<p>“It will always seems impossible until, it’s done”, is one of Mandela quote I saw at M55 office, which is actually true about the experience so far at andela, from homestudy to bootcamp and now that am accepted, it has been doing the impossible all the way.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*D9XKo0j56tFLw5G9bSvonw.jpeg" /></figure><p>The real jorney all started on monday (7/11/2016), We were introduced to the Andela team here in Nigeria after which <strong>SENI</strong> introduced us to what andela is all about, some of which actually change my mindset about andela, that andela is not just a place where we learn how to code alone, but it is a place where technology leaders are made. <strong>SENI</strong> also shared some of his experienced with us in other to motivate us that we can achieve anything as long as we believe we can do it (It will always seem impossible until it is done). We should not be afraid of success, afraid of decisions and afraid of winning.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/320/1*Uoo5OSZKdmmYC1_-MxpqaQ.jpeg" /></figure><p>So far I have been about to takeaway, what is expected of me as an andela fellow as related to the simulation period, checkpoint activities and soft skills, daily activities and weekly activities.</p><p>To achieve and exceed all the expectation set before me; I will run with the Andela core value (EPIC), I will leverage on all the resouces available to me such as the material provided in each module, learning support team and other fellows, I will ask questions, I will seek for feedback and act on it, I will give my best to all the task that will be alloted to me. I will collaborate with other fellows.</p><p>“See thou a man that is diligence in his work, he will stand before KING”, with these in mind I will strive to be diligence at all time.</p><p>#AndelaIsFun #AndelaIsAwesome #AndelaIsFamily #AndelaIsEpic #TIA</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=46ebe218ff0d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Key to Andela — Adaptability]]></title>
            <link>https://medium.com/@olawalequest/key-to-andela-adaptability-25c95ebece84?source=rss-f8aa1bcd58ad------2</link>
            <guid isPermaLink="false">https://medium.com/p/25c95ebece84</guid>
            <category><![CDATA[nodejs]]></category>
            <category><![CDATA[andela]]></category>
            <dc:creator><![CDATA[Aladeusi Olawale A]]></dc:creator>
            <pubDate>Tue, 25 Oct 2016 20:45:24 GMT</pubDate>
            <atom:updated>2016-10-25T20:45:24.950Z</atom:updated>
            <content:encoded><![CDATA[<p>“Adaptability is one of the key to open the door of Andela ”. Over the past few days, have discovered that adaptability is key to become an andela fellow, written of the home session task, when someone will have to learn a new skill and applied it immediately by solving a particular task. For example, one of the task during the home session was to write a command line application that consume a public HTTP using javascript and node.js, and for somebody like me hearing about node.js for the first time, it was only through ability to adapt to changes that helped me, i had to learn how to use node.js within few hours.</p><p>So far adapting to andela challenges has not been easy, because responding to change on it own is not an easy task. I will discuss two areas that, have been able to adapt in these few days.</p><p>First is the area of asking question. To me before now, asking questions means someone does not know what he’s/she’s doing. My thought then was why will you be asking someone question when you can google it yourself. For so long i was adapted to asking google question that i forgot the important aspect of asking one-on-one question. While i was solving one of the home session task, i spent hours trying to solving it, it got to a point that i felt that i needed help, so i decided to reluctantly asked one of my fellow boot-camper about how am suppose to go about solving the task, to my surprise he just explained it in a single line, imagine, something that have been wasting my time trying to solve all day, someone just solved it in a single line, that shows the important of asking question. Now have made up my mind to ask question whether the question make sense or not, whether the question sound foolish or not, i will just ask.</p><p>The second part is the area of seeking feedback. Before responding to feedback is something of a challenge to me. Then i wasn&#39;t even ready to hear what other people had to say about a particular task i might be working on, because i believe am the best. And i also believe that, other people will make my work look foolish, like what have been working on for days, someone will just come and be telling what is wrong with it, so i was always running away from people’s feedback. But for the past few days, thing have change, my mindset about feedback has really change, now i had to adapt to not just waiting for people to give me feedback, but also i have to ask for it. Now i ask for feedback, i want to know other people’s opinion towards what am working on, knowing the area am doing well and also the area i need to make necessary changes.</p><p>Adaptability is one of the word i can use to explain my experience so far at Andela Bootcamp. Adaptability is necessary to the growth of any aspiring programmer.</p><p>#GoForAdaptability #GoForFeeback #AskQuestion #GrowthMindset</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=25c95ebece84" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Andela Bootcamp Day 4 — So Far]]></title>
            <link>https://medium.com/@olawalequest/andela-bootcamp-day-4-so-far-4bfec908fd26?source=rss-f8aa1bcd58ad------2</link>
            <guid isPermaLink="false">https://medium.com/p/4bfec908fd26</guid>
            <category><![CDATA[andela-bootcamp]]></category>
            <category><![CDATA[andela]]></category>
            <dc:creator><![CDATA[Aladeusi Olawale A]]></dc:creator>
            <pubDate>Wed, 19 Oct 2016 15:09:07 GMT</pubDate>
            <atom:updated>2016-10-19T15:09:07.240Z</atom:updated>
            <content:encoded><![CDATA[<p>“Now am coping with with the stress”, my body is adapting gradually, better than the first three days at andela. This last few days with andela had been a very wonderful experience for me. Have learnt what it means to worked all day trying to solve just one problem without thinking of food. This is what burning with passion for something really means.</p><p>The day started with me trying to figure out how to solve the Binary Search program task and how my html/css task design will look like. After spending hours trying to solve the binary search task, still not passing one of the test cases, I had to pause it to move to the html/css task still not a hint on what my design will look like. Finally I made up my mind to work on a page about my andela boot-camper’s group (group 5), which comprises of 11 boot-campers and one facilitator.</p><p>Feedback; yet another feedback again from my facilitator about our last task, hmmm!(plenty of errors from my last task), After gotten the feedback from him and I put on hold what i was doing and made necessary correction as related to the feedback.</p><p>Now back to the day tasks, still, my binary search code refuse to pass all the test cases, even after making some manipulation to the code still not passing. This has made me to realized that it is not just about writing code to solve a particular sample, but it is about writing a generalize code that will solve all cases as related to that problem which is why my code has been running into error.</p><p>Hmmm, Sweet end, just like for every movies there will always be a happy ending, finally I got it right, today is the last day of the home learning part of the boot-camp. A very big happy ending to me.</p><p>#GoForPassion, #GoForFeedback, #GoForGrowthMindset, #GoForCollaboration.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4bfec908fd26" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Andela Bootcamp Day 3 — PASSION]]></title>
            <link>https://medium.com/@olawalequest/andela-bootcamp-day-3-passion-f8acead2ce2e?source=rss-f8aa1bcd58ad------2</link>
            <guid isPermaLink="false">https://medium.com/p/f8acead2ce2e</guid>
            <category><![CDATA[git]]></category>
            <category><![CDATA[andela-bootcamp-nigeria]]></category>
            <category><![CDATA[github]]></category>
            <dc:creator><![CDATA[Aladeusi Olawale A]]></dc:creator>
            <pubDate>Tue, 18 Oct 2016 12:55:24 GMT</pubDate>
            <atom:updated>2016-10-18T12:58:00.884Z</atom:updated>
            <content:encoded><![CDATA[<p>“You dont know what you can do, until someone pushed you” this is what this training so far has exposed me to. Pushing me to do things that I thought I cant do within a short period of time. Now I know why passion is one of the core value of andela, because when it look as if you have reached the end of the tunnel, it is only passion that will keep you going. It is only passion that has been keeping me going for this two days, not when somebody told me that am not “serious” because I couldn’t complete the day one tasks on time(and I had been working seriously all day just to complete the task to the point that I couldn’t eat), that statement would have easily discourage someone, but passion has been keeping me going, because this is what I want to do”coding”.</p><p>Now I know why the first session of day one’s discussion was about mindset — fixed mindset and growth mindset, for the past two days I know how important it is for me to apply the growth mindset,to have a open mind to learn as fast as I can.</p><p>I was also able to apply the knowledge gotten from the feedback session in the first day by following some of the feedback given to me by my group facilitator as concerning my first assignment.</p><p>Now I know what project version control is, I can create a github repository, I can push my local repo to my github repository and I know some of git commands and how it works like merge, pull etc. I can break a real life problem into functions, I can create a command line app to consume public api using curl HTTP Client tools and also in python, I know how inheritance, encapsulation and polymorphism in a class works.</p><p>It can only be PASSION</p><p>#GoForPassion, #GoFotFeedback, #GoForGrowthMindset.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f8acead2ce2e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Andela Bootcamp — My Experience so far]]></title>
            <link>https://medium.com/@olawalequest/andela-bootcamp-my-experience-so-far-765c578675c5?source=rss-f8aa1bcd58ad------2</link>
            <guid isPermaLink="false">https://medium.com/p/765c578675c5</guid>
            <category><![CDATA[growth-mindset]]></category>
            <category><![CDATA[andela]]></category>
            <dc:creator><![CDATA[Aladeusi Olawale A]]></dc:creator>
            <pubDate>Mon, 17 Oct 2016 17:54:47 GMT</pubDate>
            <atom:updated>2016-10-19T09:02:54.836Z</atom:updated>
            <content:encoded><![CDATA[<p>Hmmmmm……my experience so far…</p><p>On the first day, Chidi introduced us to all the facilitators and we were divided into five groups and each group was assigned a facilitator. After-which we started the first session Newman introduced us to two different mindset of people, one with a fixed mindset and the other with a growth mindset, with more focus on how important it is to have a growth mindset.</p><p>Second session; Mr Newman introduced us to version control system, and how important it is to use version control system in development, and he also talked about guthub and the different commands used in git.</p><p>Last session; Mr Chidi introduced us to functions in javascript, different scenarios in which it is important to use javascript, with hands-on training.</p><p>Have you received mail from andela?, that was the word in the mouth of some of us on day 2 of the bootcamp which is learning from home, as we eagerly wait for the work of the day. Finally we were sent the materials and resources needed for us to kick-start the home part of the bootcamp.</p><p>So far the experience has been wonderful.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=765c578675c5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Feedback — My Experience]]></title>
            <link>https://medium.com/@olawalequest/feedback-my-experience-f0138577d12c?source=rss-f8aa1bcd58ad------2</link>
            <guid isPermaLink="false">https://medium.com/p/f0138577d12c</guid>
            <category><![CDATA[andela-bootcamp]]></category>
            <category><![CDATA[android]]></category>
            <category><![CDATA[android-app-development]]></category>
            <dc:creator><![CDATA[Aladeusi Olawale A]]></dc:creator>
            <pubDate>Sat, 15 Oct 2016 11:03:00 GMT</pubDate>
            <atom:updated>2016-10-15T11:04:57.691Z</atom:updated>
            <content:encoded><![CDATA[<p>Some weeks back, I was working on a particular android application project, it is an application through which people can make orders for petrol or diesel, it will notify the nearby “tankfiller” dealer when people make orders and it will also send a confirmation via email and sms to the customer making the order. After weeks of stress and labor developing the application, I sent the application to my friend with good experience so that I can get his feedback on it. In his feedback, he complained about the GUI, colour combination, map location error, application not rendering correctly on his device and several alert messages on the application. Before then my thought was to complete the application before working on the GUI, but with the feedback I got from him, I then work on the GUI to make it more better, the color combination to make the application more presentable, I remove some of the unnecessary alert messages from the application, and I also work on the problem with map location session of the application and making the application to render correctly on different screen sizes and versions of android devices.</p><p>Feedback is very important as it help in getting people’s view and opinion about our work.</p><p>#GoForFeedback</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f0138577d12c" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>