arcticportal / dms-backend

Backend part of Data Management System platform.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Backend, API and CMS for Data Management System platform

Code style: black Code style: pep8

1. Frameworks and libraries used

Django
Wagtail CMS
Strawberry GraphQL
Uvicorn
Celery
Redis
Pandas
Jupyter
django-extensions

2. Installation

This code depends on dms-platform. In this repository installation instructions for whole project can be found.

3. GraphQL example queries

For making graphical queries during development go to localhost:8000/graphiql. On the right up corner is Documentation for all available queries.

3.1. Find pk for Iceland

query Country {
  countries(filters: {name: {exact: "Iceland"}}) {
    id
    name
    fips10
    continent
    subregion
    countryType
    iso2
    iso3
    wikidataId
  }
}

3.2. View all Icelandic states

query State {
  states(filters: {country: {pk: 146}}) {
    id
    name
    fips
    adm1Code
    country
    stateType
  }
}

3.3. Show available cities in Iceland

query Cities {
  cities(filters: {country: {pk: 146}}) {
    name
    point
    country
    cityType
    wikidataId
    whosonfirstId
    geonamesId
  }
}

3.4. Show all airports in Norðurland eystra

query Airports {
  airports(filters: {state: {pk: 4991}}) {
    name
    point
    airportType
  }
}

3.5. Show all available oceans

query BodyofWater {
  bodiesOfWater(filters: {bodyOfWaterType: {pk: 2}}){
    name
    wikidataId
    bodyOfWaterType
  }
}

3.6. Show all scientific stations:

query ScientificStations {
  scientificStations {
    name
    geonamesId
    point
    country
    scienceStationType
  }
}

About

Backend part of Data Management System platform.


Languages

Language:Python 81.6%Language:HTML 12.8%Language:CSS 3.9%Language:Dockerfile 1.4%Language:Shell 0.3%