Skip to content

kafu24/ultimate-fighting-api-fork

 
 

Repository files navigation

Ultimate Fighting Api — Stats and Community

Report a Bug · Request a Feature

PRs welcome made with hearth by kafu24, jmurillo07, LMWTT1230

Table of Contents

About

This API is meant to serve an application extracting information on UFC fighter and event data. The UFC (ultimate fighting championship) is the premier mixed martial arts competition in the world that hosts events throughout the year on a near weekly basis. Additionally, it has support for users and community predictions, storing the predictions users have on certain fights on who would win.

Built With

Getting Started

Prerequisites

  • fastapi==0.88.0
  • pytest==7.1.3
  • uvicorn==0.20.0
  • sqlalchemy==2.0.7
  • psycopg2-binary~=2.9.3

Installation

After cloning the repository, create a .env file where you will then fill out the below with your own values. This will allow the engine to connect to your database.

POSTGRES_DB="postgres"
POSTGRES_SERVER="localhost"
POSTGRES_PASSWORD="postgres"
POSTGRES_USER="postgres"
POSTGRES_PORT="54322"

If desired, one can run converter.py to populate their database with real data (ufc_event_data.csv, ufc_fighters.csv) or src/post_fake_data.py to populate it with fake data.

Usage

Usage

We have a production API being hosted on Vercel here:

If you would like to create your own server, you would need to adjust your environment variables for your database appropriately.

Starting up a local server then becomes as easy as:

python main.py

Roadmap

See the open issues for a list of proposed features (and known issues).

Authors & contributors

For a full list of all authors and contributors, see the contributors page.

Security

Ultimate-fighting-API follows good practices of security, but 100% security cannot be assured. Ultimate-fighting-API is provided "as is" without any warranty. Use at your own risk.

For more information and to report security issues, please refer to our security documentation.

Acknowledgements

Huge gratitude towards https://github.com/jackalnom/movie_api for providing us with a template we heavily relied on.

The .csv files were taken from https://www.kaggle.com/datasets/fatismajli/ufc-data?select=ufc_event_data.csv.

Additionally, https://github.com/jackalnom/fake_post_data was referenced to aid in the creation of our fake data populator.

About

Only local testing

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 99.5%
  • Mako 0.5%