Introduction

Frontend and backend are two essential components of a web application. The frontend is the part of the application that interacts with the user, whereas the backend is the part that handles the logic and data processing behind the scenes.

The frontend, also known as the client-side, typically consists of HTML, CSS, and JavaScript code that runs in the user's web browser. The frontend handles the user interface, page layout, and overall look of the application. It also handles user interactions, such as submitting forms, clicking buttons, and navigating between pages.

On the other hand, the backend, also known as the server-side, typically consists of a server, a database, and, in our case, APIs. The backend handles the processing and storage of data, manages user authentication and authorization, and handles business logic and rules. The backend also communicates with the frontend, providing the necessary data to render the user interface and processing user inputs.

Backend

In our class we mainly use Python and SQL/JSON to create APIs and databases. Here is a simple example of creating a SQL database and using CRUD as well.

What is CRUD

  • C: The 'C' stands for create, meaning to create a new entry in a database. In this case, creating a new entry about a certain movie or TV show.

  • R: Read, or to retrieve data from the database. In this case it is selecting the movie/TV shwo that you choose to display.

  • U: Update, or changing an existing entry in the database. In this case it is selecting the preexisting movie/TV show and changing the values to match what you want.

  • D: Delete, or removing data from the database. In this case it is selecting the preexisting movie/TV show and removing the entry from the database.

Films API

This API is intended to be used as a list of movies and TV shows that a person has watched. It includes attributes for the Film name(key), the year released, the language, the number of episodes, A list of the number of episodes(using pickletype), and a youtube url for the trailer. The CRUD works as follows: Create: Enter the above mentioned attributes Read: Returns all of the films and their attributes Update: Takes in new episodes watched, and a list of their names, and adds them to their respective attibutes Delete: Option for deleting every film, also takes in a name to delete that film if it exists

from flask import Flask
import sqlite3

app = Flask(__name__)
# Connect to the SQLite database using SQLite3
conn = sqlite3.connect('instance/films.db')

# Create a cursor object to execute SQL commands
cursor = conn.cursor()

# Create a table in the database
cursor.execute('''CREATE TABLE movies
                 (id INTEGER PRIMARY KEY, title TEXT, year INTEGER, epcount INTEGER, language TEXT, trailer TEXT, eplist TEXT)''')

# Commit the changes to the database and close the connection
conn.commit()
conn.close()
import sqlite3

def create():
    # Ask the user for movie details
    title = input("Enter the movie/tv show title: ")
    year = input("Enter the movie/tv show release year: ")
    epcount = input("Enter the movie/tv show epcount: ")
    language = input("Enter the movie/tv show language: ")
    eplist = input("Enter the movie/tv show episode names: ")
    trailer = input("Enter the link movie/tv show trailer: ")

    # Connect to the database and create a cursor to execute SQL commands
    database = 'instance/films.db'
    connection = sqlite3.connect(database)
    cursor = connection.cursor()

    try:
        # Execute SQL to insert record into db
        cursor.execute("INSERT INTO movies (title, year, epcount, language, eplist, trailer) VALUES (?, ?, ?, ?, ?, ?)", (title, year, epcount, language, eplist, trailer))
        # Commit the changes
        connection.commit()
        print(f"{title} has been added to the list of movies.")

    except sqlite3.Error as error:
        print("Error while inserting record:", error)

    # Close cursor and connection
    cursor.close()
    connection.close()

create()
Kung Fu Panda has been added to the list of movies.
def read(id):
    # Connect to the database and create a cursor to execute SQL commands
    database = 'instance/films.db'
    connection = sqlite3.connect(database)
    cursor = connection.cursor()

    # Execute SQL to select a record from db by id
    cursor.execute("SELECT * FROM movies WHERE id=?", (id,))

    # Fetch the record from the cursor
    movie = cursor.fetchone()

    # If movie exists, print its details, else print message
    if movie:
        print(f"{movie[0]}. {movie[1]}, {movie[2]}, {movie[3]}, {movie[4]}, {movie[5]}, {movie[6]}")
    else:
        print("Movie not found.")

    # Close cursor and connection
    cursor.close()
    connection.close()

read(id=1)
1. Kung Fu Panda, 2008, 4, English, https://www.youtube.com/watch?v=NRc-ze7Wrxw, Kung Fu Panda 1 2 3 4
def update(id):
    # Connect to the database and create a cursor to execute SQL commands
    database = 'films.db'
    connection = sqlite3.connect(database)
    cursor = connection.cursor()

    # Ask the user for movie details to update
    title = input("Enter the updated movie/tv show title: ")
    year = input("Enter the updated movie/tv show release year: ")
    epcount = input("Enter the updated movie/tv show epcount: ")
    language = input("Enter the updated movie/tv show language: ")
    eplist = input("Enter the updated movie/tv show episode names: ")
    trailer = input("Enter the updated link movie/tv show trailer: ")

    try:
        # Execute SQL to update the record in db
        cursor.execute("UPDATE movies SET title=?, year=?, epcount=?, language=?, eplist=?, trailer=? WHERE id=?", (title, year, epcount, language, eplist, trailer, id))
        # Commit the changes
        connection.commit()
        print("Movie updated successfully.")

    except sqlite3.Error as error:
        print("Error while updating record:", error)

    # Close cursor and connection
    cursor.close()
    connection.close()

update(id=1)
Movie updated successfully.
def delete(id):
    # Connect to the database and create a cursor to execute SQL commands
    database = 'films.db'
    connection = sqlite3.connect(database)
    cursor = connection.cursor()

    try:
        # Execute SQL to delete the record from db by id
        cursor.execute("DELETE FROM movies WHERE id=?", (id,))
        # Commit the changes
        connection.commit()
        print("Movie deleted successfully.")

    except sqlite3.Error as error:
        print("Error while deleting record:", error)

    # Close cursor and connection
    cursor.close()
    connection.close()

delete(id=2)
Movie deleted successfully.

Fetching

Overview

  • Involves retrieving data from a server or database
  • Can use different HTTP methods, such as GET, POST, PUT, and DELETE, to perform different types of operations on the server.
  • Fetching can be done through a variety of ways including AJAX, XHR, and Axios
  • In APCSP we tend to use the Fetch API over anything else
  • Fetching involves sending a request to a server using a URL (Uniform Resource Locator), which identifies the location of the resource being requested.
  • Can receive data in various formats, including JSON
  • JSON data can be parsed into objects and arrays in JavaScript, making it easy to work with and manipulate in the frontend

Python Fetch Using Request

import requests

url = "https://moviesdatabase.p.rapidapi.com/titles"

headers = {
	"content-type": "application/octet-stream",
	"X-RapidAPI-Key": "8401db6433msh3a46dd5bf23ad2ep19a280jsn48536a994246",
	"X-RapidAPI-Host": "moviesdatabase.p.rapidapi.com"
}

response = requests.get(url, headers=headers)

print(response.json())
{'page': 1, 'next': '/titles?page=2', 'entries': 10, 'results': [{'id': 'tt0001922', 'primaryImage': {'id': 'rm736959488', 'width': 800, 'height': 563, 'url': 'https://m.media-amazon.com/images/M/MV5BZDI4MmJiMmMtMzQ3Mi00N2Y0LTlkYmUtYmQ0ZTQ1NzVlZmVjXkEyXkFqcGdeQXVyMDUyOTUyNQ@@._V1_.jpg', 'caption': {'plainText': 'Darwin Karr and Gertrude McCoy in That Winsome Winnie Smile (1911)', '__typename': 'Markdown'}, '__typename': 'Image'}, 'titleType': {'text': 'Short', 'id': 'short', 'isSeries': False, 'isEpisode': False, '__typename': 'TitleType'}, 'titleText': {'text': 'That Winsome Winnie Smile', '__typename': 'TitleText'}, 'releaseYear': {'year': 1911, 'endYear': None, '__typename': 'YearRange'}, 'releaseDate': {'day': 9, 'month': 9, 'year': 1911, '__typename': 'ReleaseDate'}}, {'id': 'tt0001539', 'primaryImage': {'id': 'rm1311052544', 'width': 800, 'height': 582, 'url': 'https://m.media-amazon.com/images/M/MV5BZGY5NzI0MzQtM2EwYi00NzY2LThiYjYtYTM5YmViZDEwMzkzXkEyXkFqcGdeQXVyMDUyOTUyNQ@@._V1_.jpg', 'caption': {'plainText': 'Caïn et Abel (1911)', '__typename': 'Markdown'}, '__typename': 'Image'}, 'titleType': {'text': 'Short', 'id': 'short', 'isSeries': False, 'isEpisode': False, '__typename': 'TitleType'}, 'titleText': {'text': 'Caïn et Abel', '__typename': 'TitleText'}, 'releaseYear': {'year': 1911, 'endYear': None, '__typename': 'YearRange'}, 'releaseDate': {'day': None, 'month': None, 'year': 1911, '__typename': 'ReleaseDate'}}, {'id': 'tt0001636', 'primaryImage': None, 'titleType': {'text': 'Short', 'id': 'short', 'isSeries': False, 'isEpisode': False, '__typename': 'TitleType'}, 'titleText': {'text': 'Galileo', '__typename': 'TitleText'}, 'releaseYear': {'year': 1911, 'endYear': None, '__typename': 'YearRange'}, 'releaseDate': {'day': None, 'month': 7, 'year': 1911, '__typename': 'ReleaseDate'}}, {'id': 'tt0002148', 'primaryImage': {'id': 'rm1303852544', 'width': 700, 'height': 526, 'url': 'https://m.media-amazon.com/images/M/MV5BMWY2ODg0YWEtZDVmYy00OTEwLTkxN2YtYzY5ZmRmNjVlZWYyXkEyXkFqcGdeQXVyMDUyOTUyNQ@@._V1_.jpg', 'caption': {'plainText': "Fred Mace and Mabel Normand in The Drummer's Vacation (1912)", '__typename': 'Markdown'}, '__typename': 'Image'}, 'titleType': {'text': 'Short', 'id': 'short', 'isSeries': False, 'isEpisode': False, '__typename': 'TitleType'}, 'titleText': {'text': "The Drummer's Vacation", '__typename': 'TitleText'}, 'releaseYear': {'year': 1912, 'endYear': None, '__typename': 'YearRange'}, 'releaseDate': {'day': 23, 'month': 12, 'year': 1912, '__typename': 'ReleaseDate'}}, {'id': 'tt0001702', 'primaryImage': None, 'titleType': {'text': 'Short', 'id': 'short', 'isSeries': False, 'isEpisode': False, '__typename': 'TitleType'}, 'titleText': {'text': "The Indian Maiden's Lesson", '__typename': 'TitleText'}, 'releaseYear': {'year': 1911, 'endYear': None, '__typename': 'YearRange'}, 'releaseDate': {'day': 22, 'month': 4, 'year': 1911, '__typename': 'ReleaseDate'}}, {'id': 'tt0001856', 'primaryImage': {'id': 'rm970923264', 'width': 800, 'height': 597, 'url': 'https://m.media-amazon.com/images/M/MV5BYmVhNGZlZTEtNjFmMS00MjEyLThkZmMtMTIwZjRjNzFkYjU3XkEyXkFqcGdeQXVyMDUyOTUyNQ@@._V1_.jpg', 'caption': {'plainText': 'Edwin August and Dorothy West in The Revenue Man and the Girl (1911)', '__typename': 'Markdown'}, '__typename': 'Image'}, 'titleType': {'text': 'Short', 'id': 'short', 'isSeries': False, 'isEpisode': False, '__typename': 'TitleType'}, 'titleText': {'text': 'The Revenue Man and the Girl', '__typename': 'TitleText'}, 'releaseYear': {'year': 1911, 'endYear': None, '__typename': 'YearRange'}, 'releaseDate': {'day': 25, 'month': 9, 'year': 1911, '__typename': 'ReleaseDate'}}, {'id': 'tt0001790', 'primaryImage': {'id': 'rm635370240', 'width': 1748, 'height': 1340, 'url': 'https://m.media-amazon.com/images/M/MV5BMjAzMzQ3MjQxOV5BMl5BanBnXkFtZTgwMDQzNzExMzE@._V1_.jpg', 'caption': {'plainText': 'Eugénie Nau in Les misérables - Époque 1: Jean Valjean (1913)', '__typename': 'Markdown'}, '__typename': 'Image'}, 'titleType': {'text': 'Movie', 'id': 'movie', 'isSeries': False, 'isEpisode': False, '__typename': 'TitleType'}, 'titleText': {'text': 'Les misérables - Époque 1: Jean Valjean', '__typename': 'TitleText'}, 'releaseYear': {'year': 1913, 'endYear': None, '__typename': 'YearRange'}, 'releaseDate': {'day': 3, 'month': 1, 'year': 1913, '__typename': 'ReleaseDate'}}, {'id': 'tt0000543', 'primaryImage': None, 'titleType': {'text': 'Short', 'id': 'short', 'isSeries': False, 'isEpisode': False, '__typename': 'TitleType'}, 'titleText': {'text': 'Christian IXS bisættelse', '__typename': 'TitleText'}, 'releaseYear': {'year': 1906, 'endYear': None, '__typename': 'YearRange'}, 'releaseDate': {'day': 19, 'month': 2, 'year': 1906, '__typename': 'ReleaseDate'}}, {'id': 'tt0002089', 'primaryImage': None, 'titleType': {'text': 'Movie', 'id': 'movie', 'isSeries': False, 'isEpisode': False, '__typename': 'TitleType'}, 'titleText': {'text': 'Carmen', '__typename': 'TitleText'}, 'releaseYear': {'year': 1912, 'endYear': None, '__typename': 'YearRange'}, 'releaseDate': None}, {'id': 'tt0000548', 'primaryImage': None, 'titleType': {'text': 'Short', 'id': 'short', 'isSeries': False, 'isEpisode': False, '__typename': 'TitleType'}, 'titleText': {'text': 'Fiskerliv i Norden', '__typename': 'TitleText'}, 'releaseYear': {'year': 1906, 'endYear': None, '__typename': 'YearRange'}, 'releaseDate': {'day': 15, 'month': 9, 'year': 1906, '__typename': 'ReleaseDate'}}]}

This is a functional fetch of a movies API from Rapid API, but the data isn't very readable. Below is an example of using Pandas to format the key values as a dataframe.

import requests
import pandas as pd

url = "https://moviesdatabase.p.rapidapi.com/titles"

headers = {
    "content-type": "application/octet-stream",
    "X-RapidAPI-Key": "8401db6433msh3a46dd5bf23ad2ep19a280jsn48536a994246",
    "X-RapidAPI-Host": "moviesdatabase.p.rapidapi.com"
}

response = requests.get(url, headers=headers)
data = response.json()

# Create an empty DataFrame
df = pd.DataFrame()

# Extract the required information and store it in a list of dictionaries
results = data["results"]
entries = []
for result in results:
    entry = {
        "id": result["id"],
        "title": result["titleText"]["text"],
        "release_year": result["releaseYear"]["year"],
    }
    entries.append(entry)

# Convert the list of dictionaries into a DataFrame
df = pd.DataFrame(entries)

print(df)



# ADD YOUR OWN COLUMN TO THE DATAFRAME
          id                                    title  release_year
0  tt0001922                That Winsome Winnie Smile          1911
1  tt0001539                             Caïn et Abel          1911
2  tt0001636                                  Galileo          1911
3  tt0002148                   The Drummer's Vacation          1912
4  tt0001702               The Indian Maiden's Lesson          1911
5  tt0001856             The Revenue Man and the Girl          1911
6  tt0001790  Les misérables - Époque 1: Jean Valjean          1913
7  tt0000543                 Christian IXS bisættelse          1906
8  tt0002089                                   Carmen          1912
9  tt0000548                       Fiskerliv i Norden          1906

Using Pandas to format a request obtained from a 3rd Party API makes it much easier to read and you can select what you want to display as well. Pandas makes it easy to access data that you feel is important.

Backend and Frontend Example

Write notes below

UI/UX creation and maintenance utilizing HTML, CSS, and JavaScript is known as frontend development. ensuring the website/app is simple to use and appealing to the eye

PHP, Ruby, Python, or other server-side programming languages are used for backend development. handling database management, server-side operations, and data processing Ensuring data management, scalability, and security

Frontend developers use fetching functionality to retrieve data from a server via AJAX, the Fetch API, or third-party libraries like Axios.

Create, Read, Update, and Delete are known as CRUD operations when applied to data in a database or online application. CRUD functionality is implemented by backend developers. used in web development to manage data and user input

Hacks

  1. Create a completely unique API with all 4 CRUD features (Create, Read, Update, Delete)
  2. Create a Fetch API request for your corresponding API
  3. Attempt a complete website on GitHub Pages including HTML

Has Full Stack Requirements

  • Has frontend/backend developments
  • Uses input fields for the user in which when the submit button is clicked, leaderboard is updated

Currently the tngc.nighthawkcodescrums.gq is down completely, but I tested before and code does work as shown in video

import requests
import pandas as pd

url = "https://tngc.nighthawkcodescrums.gq/api/battleship_users/"

response = requests.get(url)
data = response.json()

df = pd.DataFrame()
entries = []
for result in data:
    entry = {
        "username": result["username"],
        "score": result["score"],
    }
    entries.append(entry)

df = pd.DataFrame(entries)

print(df)
---------------------------------------------------------------------------
SSLEOFError                               Traceback (most recent call last)
File ~/opt/anaconda3/lib/python3.9/site-packages/urllib3/connectionpool.py:703, in HTTPConnectionPool.urlopen(self, method, url, body, headers, retries, redirect, assert_same_host, timeout, pool_timeout, release_conn, chunked, body_pos, **response_kw)
    702 # Make the request on the httplib connection object.
--> 703 httplib_response = self._make_request(
    704     conn,
    705     method,
    706     url,
    707     timeout=timeout_obj,
    708     body=body,
    709     headers=headers,
    710     chunked=chunked,
    711 )
    713 # If we're going to release the connection in ``finally:``, then
    714 # the response doesn't need to know about the connection. Otherwise
    715 # it will also try to release it and we'll have a double-release
    716 # mess.

File ~/opt/anaconda3/lib/python3.9/site-packages/urllib3/connectionpool.py:386, in HTTPConnectionPool._make_request(self, conn, method, url, timeout, chunked, **httplib_request_kw)
    385 try:
--> 386     self._validate_conn(conn)
    387 except (SocketTimeout, BaseSSLError) as e:
    388     # Py2 raises this as a BaseSSLError, Py3 raises it as socket timeout.

File ~/opt/anaconda3/lib/python3.9/site-packages/urllib3/connectionpool.py:1040, in HTTPSConnectionPool._validate_conn(self, conn)
   1039 if not getattr(conn, "sock", None):  # AppEngine might not have  `.sock`
-> 1040     conn.connect()
   1042 if not conn.is_verified:

File ~/opt/anaconda3/lib/python3.9/site-packages/urllib3/connection.py:414, in HTTPSConnection.connect(self)
    412     context.load_default_certs()
--> 414 self.sock = ssl_wrap_socket(
    415     sock=conn,
    416     keyfile=self.key_file,
    417     certfile=self.cert_file,
    418     key_password=self.key_password,
    419     ca_certs=self.ca_certs,
    420     ca_cert_dir=self.ca_cert_dir,
    421     ca_cert_data=self.ca_cert_data,
    422     server_hostname=server_hostname,
    423     ssl_context=context,
    424     tls_in_tls=tls_in_tls,
    425 )
    427 # If we're using all defaults and the connection
    428 # is TLSv1 or TLSv1.1 we throw a DeprecationWarning
    429 # for the host.

File ~/opt/anaconda3/lib/python3.9/site-packages/urllib3/util/ssl_.py:449, in ssl_wrap_socket(sock, keyfile, certfile, cert_reqs, ca_certs, server_hostname, ssl_version, ciphers, ssl_context, ca_cert_dir, key_password, ca_cert_data, tls_in_tls)
    448 if send_sni:
--> 449     ssl_sock = _ssl_wrap_socket_impl(
    450         sock, context, tls_in_tls, server_hostname=server_hostname
    451     )
    452 else:

File ~/opt/anaconda3/lib/python3.9/site-packages/urllib3/util/ssl_.py:493, in _ssl_wrap_socket_impl(sock, ssl_context, tls_in_tls, server_hostname)
    492 if server_hostname:
--> 493     return ssl_context.wrap_socket(sock, server_hostname=server_hostname)
    494 else:

File ~/opt/anaconda3/lib/python3.9/ssl.py:500, in SSLContext.wrap_socket(self, sock, server_side, do_handshake_on_connect, suppress_ragged_eofs, server_hostname, session)
    494 def wrap_socket(self, sock, server_side=False,
    495                 do_handshake_on_connect=True,
    496                 suppress_ragged_eofs=True,
    497                 server_hostname=None, session=None):
    498     # SSLSocket class handles server_hostname encoding before it calls
    499     # ctx._wrap_socket()
--> 500     return self.sslsocket_class._create(
    501         sock=sock,
    502         server_side=server_side,
    503         do_handshake_on_connect=do_handshake_on_connect,
    504         suppress_ragged_eofs=suppress_ragged_eofs,
    505         server_hostname=server_hostname,
    506         context=self,
    507         session=session
    508     )

File ~/opt/anaconda3/lib/python3.9/ssl.py:1040, in SSLSocket._create(cls, sock, server_side, do_handshake_on_connect, suppress_ragged_eofs, server_hostname, context, session)
   1039             raise ValueError("do_handshake_on_connect should not be specified for non-blocking sockets")
-> 1040         self.do_handshake()
   1041 except (OSError, ValueError):

File ~/opt/anaconda3/lib/python3.9/ssl.py:1309, in SSLSocket.do_handshake(self, block)
   1308         self.settimeout(None)
-> 1309     self._sslobj.do_handshake()
   1310 finally:

SSLEOFError: EOF occurred in violation of protocol (_ssl.c:1129)

During handling of the above exception, another exception occurred:

MaxRetryError                             Traceback (most recent call last)
File ~/opt/anaconda3/lib/python3.9/site-packages/requests/adapters.py:489, in HTTPAdapter.send(self, request, stream, timeout, verify, cert, proxies)
    488 if not chunked:
--> 489     resp = conn.urlopen(
    490         method=request.method,
    491         url=url,
    492         body=request.body,
    493         headers=request.headers,
    494         redirect=False,
    495         assert_same_host=False,
    496         preload_content=False,
    497         decode_content=False,
    498         retries=self.max_retries,
    499         timeout=timeout,
    500     )
    502 # Send the request.
    503 else:

File ~/opt/anaconda3/lib/python3.9/site-packages/urllib3/connectionpool.py:785, in HTTPConnectionPool.urlopen(self, method, url, body, headers, retries, redirect, assert_same_host, timeout, pool_timeout, release_conn, chunked, body_pos, **response_kw)
    783     e = ProtocolError("Connection aborted.", e)
--> 785 retries = retries.increment(
    786     method, url, error=e, _pool=self, _stacktrace=sys.exc_info()[2]
    787 )
    788 retries.sleep()

File ~/opt/anaconda3/lib/python3.9/site-packages/urllib3/util/retry.py:592, in Retry.increment(self, method, url, response, error, _pool, _stacktrace)
    591 if new_retry.is_exhausted():
--> 592     raise MaxRetryError(_pool, url, error or ResponseError(cause))
    594 log.debug("Incremented Retry for (url='%s'): %r", url, new_retry)

MaxRetryError: HTTPSConnectionPool(host='tngc.nighthawkcodescrums.gq', port=443): Max retries exceeded with url: /api/battleship_users/ (Caused by SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:1129)')))

During handling of the above exception, another exception occurred:

SSLError                                  Traceback (most recent call last)
/Users/parav/vscode/firstrepo/_notebooks/2023-04-28-frontendBackend.ipynb Cell 22 in <cell line: 6>()
      <a href='vscode-notebook-cell:/Users/parav/vscode/firstrepo/_notebooks/2023-04-28-frontendBackend.ipynb#X30sZmlsZQ%3D%3D?line=1'>2</a> import pandas as pd
      <a href='vscode-notebook-cell:/Users/parav/vscode/firstrepo/_notebooks/2023-04-28-frontendBackend.ipynb#X30sZmlsZQ%3D%3D?line=3'>4</a> url = "https://tngc.nighthawkcodescrums.gq/api/battleship_users/"
----> <a href='vscode-notebook-cell:/Users/parav/vscode/firstrepo/_notebooks/2023-04-28-frontendBackend.ipynb#X30sZmlsZQ%3D%3D?line=5'>6</a> response = requests.get(url)
      <a href='vscode-notebook-cell:/Users/parav/vscode/firstrepo/_notebooks/2023-04-28-frontendBackend.ipynb#X30sZmlsZQ%3D%3D?line=6'>7</a> data = response.json()
      <a href='vscode-notebook-cell:/Users/parav/vscode/firstrepo/_notebooks/2023-04-28-frontendBackend.ipynb#X30sZmlsZQ%3D%3D?line=8'>9</a> df = pd.DataFrame()

File ~/opt/anaconda3/lib/python3.9/site-packages/requests/api.py:73, in get(url, params, **kwargs)
     62 def get(url, params=None, **kwargs):
     63     r"""Sends a GET request.
     64 
     65     :param url: URL for the new :class:`Request` object.
   (...)
     70     :rtype: requests.Response
     71     """
---> 73     return request("get", url, params=params, **kwargs)

File ~/opt/anaconda3/lib/python3.9/site-packages/requests/api.py:59, in request(method, url, **kwargs)
     55 # By using the 'with' statement we are sure the session is closed, thus we
     56 # avoid leaving sockets open which can trigger a ResourceWarning in some
     57 # cases, and look like a memory leak in others.
     58 with sessions.Session() as session:
---> 59     return session.request(method=method, url=url, **kwargs)

File ~/opt/anaconda3/lib/python3.9/site-packages/requests/sessions.py:587, in Session.request(self, method, url, params, data, headers, cookies, files, auth, timeout, allow_redirects, proxies, hooks, stream, verify, cert, json)
    582 send_kwargs = {
    583     "timeout": timeout,
    584     "allow_redirects": allow_redirects,
    585 }
    586 send_kwargs.update(settings)
--> 587 resp = self.send(prep, **send_kwargs)
    589 return resp

File ~/opt/anaconda3/lib/python3.9/site-packages/requests/sessions.py:701, in Session.send(self, request, **kwargs)
    698 start = preferred_clock()
    700 # Send the request
--> 701 r = adapter.send(request, **kwargs)
    703 # Total elapsed time of the request (approximately)
    704 elapsed = preferred_clock() - start

File ~/opt/anaconda3/lib/python3.9/site-packages/requests/adapters.py:563, in HTTPAdapter.send(self, request, stream, timeout, verify, cert, proxies)
    559         raise ProxyError(e, request=request)
    561     if isinstance(e.reason, _SSLError):
    562         # This branch is for urllib3 v1.22 and later.
--> 563         raise SSLError(e, request=request)
    565     raise ConnectionError(e, request=request)
    567 except ClosedPoolError as e:

SSLError: HTTPSConnectionPool(host='tngc.nighthawkcodescrums.gq', port=443): Max retries exceeded with url: /api/battleship_users/ (Caused by SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:1129)')))