Giter Site home page Giter Site logo

palestine-api's Introduction


Tech4Palestine

palestine API

A Simple Fastapi for https://data.techforpalestine.org/docs/datasets/

Dependabot Badge GitHub code size in bytes

palestine-api is a simple Fastapi integrated with palestine-datasets. The main purpose is to make a quick and simple API for requesting the latest data available from palestine-datasets.

๐Ÿ“– Prerequisites

In order to run the project we need python>=3.12 and uv for package management.

Install uv following the offical repo

๐Ÿ–ฅ๏ธ Local development

To install the application:

uv venv
source .venv/bin/activate
uv pip sync requirements.txt

Windows:

uv venv
.venv\Scripts\activate
uv pip sync requirements.txt

To start a local copy of the app on port 3000:

uvicorn main:app --reload

๐Ÿงช Test

PENDING

๐Ÿ“ฆ Docker builds

PENDING

๐ŸŽจ Code linting

To check the code and styles quality, use the following command:

# Lint your code
ruff check

# Format your code
ruff format

๐Ÿš€ Production deployment

PENDING

๐Ÿ’พ Database

This project uses data from palestine-datasets, a curated list of reputable sources. Check out their repo and site for more in depth data questions as a database.

๐Ÿค Contributing

PENDING

๐Ÿ• Community

Got Questions? Join the conversation in our Discord.

โš–๏ธ LICENSE

MIT ยฉ palestine-api

palestine-api's People

Contributors

ummahrican avatar

Stargazers

furkanaydgn avatar

Watchers

 avatar

Forkers

sullivansantana

palestine-api's Issues

API endpoints

Hey ๐Ÿ‘‹๐Ÿป was just adding this to our examples page and noticed in your code you're referencing the github files and not our API endpoints.

It's worth noting that if we change the locations of these files in the repository that we're not considering that a breaking change. We version our own API for that reason, to allow old endpoints to continue to function as they used to while we introduce major changes in the future, including to our code structure. For that reason I'd recommend using our documented API endpoints and not querying raw github content

This is important if you intend for us to refer to this library as a canonical example of how others can use our API or build their own on top of it.

For example these lines:

palestine-api/main.py

Lines 6 to 8 in 5f5bd90

casualties_url = "https://raw.githubusercontent.com/TechForPalestine/palestine-datasets/b0328917f163c55fb03de6184395bafdd22b35ec/casualties_daily.min.json"
killed_url = "https://raw.githubusercontent.com/TechForPalestine/palestine-datasets/b0328917f163c55fb03de6184395bafdd22b35ec/killed-in-gaza.min.json"
westbank_url = "https://raw.githubusercontent.com/TechForPalestine/palestine-datasets/b0328917f163c55fb03de6184395bafdd22b35ec/west_bank_daily.min.json"

should instead be

casualties_url = "https://data.techforpalestine.org/api/v2/casualties_daily.min.json"
killed_url = "https://data.techforpalestine.org/api/v2/killed-in-gaza.min.json"
westbank_url = "https://data.techforpalestine.org/api/v2/west_bank_daily.min.json"

These links are right in the docs pages

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.