{"id":24374216,"url":"https://github.com/mannuelf/nuc-studio-1-project-backend","last_synced_at":"2026-05-20T00:32:28.805Z","repository":{"id":147845511,"uuid":"304362774","full_name":"mannuelf/nuc-studio-1-project-backend","owner":"mannuelf","description":"Flask REST API, servers as a back-end for FactBook Explorers web app.","archived":false,"fork":false,"pushed_at":"2022-12-21T16:45:12.000Z","size":360,"stargazers_count":1,"open_issues_count":8,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-19T05:33:20.201Z","etag":null,"topics":["python3"],"latest_commit_sha":null,"homepage":"nuc-studio-1-project-backend.vercel.app","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mannuelf.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-10-15T15:05:05.000Z","updated_at":"2023-03-04T02:44:29.000Z","dependencies_parsed_at":"2023-05-27T16:45:42.595Z","dependency_job_id":null,"html_url":"https://github.com/mannuelf/nuc-studio-1-project-backend","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mannuelf%2Fnuc-studio-1-project-backend","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mannuelf%2Fnuc-studio-1-project-backend/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mannuelf%2Fnuc-studio-1-project-backend/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mannuelf%2Fnuc-studio-1-project-backend/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mannuelf","download_url":"https://codeload.github.com/mannuelf/nuc-studio-1-project-backend/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243207143,"owners_count":20253823,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["python3"],"created_at":"2025-01-19T05:27:22.151Z","updated_at":"2025-12-28T04:05:21.141Z","avatar_url":"https://github.com/mannuelf.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# FactBook Explorers\n\n\u003e Backend,RESTful API\n\nDemo URLS\n\n[https://factbook-explorers-two.herokuapp.com/population-levels](https://factbook-explorers-two.herokuapp.com/population-levels)\n\n[https://factbook-explorers-two.herokuapp.com/gross-gdp](https://factbook-explorers-two.herokuapp.com/gross-gdp)\n\n## Local development\n\nTo get started download the repo using SSH ([guide on SSH](https://docs.github.com/en/free-pro-team@latest/github/authenticating-to-github/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent))\n\n```bash\ngit clone git@github.com:mannuelf/nuc-studio-1-project-backend.git\n\ncd nuc-studio-1-project-backend/\n\n```\n\n## Install Package Manager\n\nInstall packages easily with a package manager.\n\n### MAC\n\n[Homebrew](https://brew.sh/)\n\n### Windows\n\n[Chocolatey](https://chocolatey.org/)\n\n### Install pyenv\n\npyenv manages your python versions on your laptop. so you can install multiple versions, MacOS ships with 2.7 but we need \u003e= 3.8.7\n\n[installation instructions](https://github.com/pyenv/pyenv)\n\n[🖥 MAC](https://github.com/pyenv/pyenv#homebrew-on-macos)\n\n[💻 WINDOWS](https://chocolatey.org/packages/pyenv-win)\n\nIf all required dependencies are installed, to work on the project you must run it in a python environment using pipenv.\n\n## Set python to 3.8.7\n\nInstall pyenv first:\n[installation instructions](https://github.com/pyenv/pyenv)\n\n```bash\npyenv global 3.8.7\n```\n\nThe run this command in your shell to init pyenv.\n\n```bash\neval \"$(pyenv init -)\"\n```\n\nAlso add is to your .bash_profile. what is bash_profile? [click here to read](https://linuxize.com/post/bashrc-vs-bash-profile/).\n\n## Install pipenv\n\n[pipenv docs](https://pypi.org/project/pipenv/)\n\n```bash\npip install pipenv\n```\n\n### Install PROJECT dependencies\n\nThere is a Pipfile, which lists all packages needed to run app.\n\n```bash\npipenv install\n```\n\n### 1. Start server\n\nRun this command to start a python environment, immediately afterwards run python app.py, this will start the server and you can begin.\n\n```bash\npipenv shell\n```\n\nStart in DEVELOPMENT mode\n\n```bash\nexport FLASK_ENV=development\n```\n\nthen run the app\n\n```bash\nflask run\n```\n\n### 2. Endpoints\n\n| Method | Endpoint                        | Description                                   |\n| ------ | :------------------------------ | :-------------------------------------------- |\n| GET    | /population-levels              | Gets all population level                     |\n| GET    | /population-levels/country      | Gets all population level by country          |\n| GET    | /population-levels/country/year | Gets all population level by country and year |\n| GET    | /hello-world                    | Gets all test messages                        |\n| GET    | /hello-world/{id}               | Get one message                               |\n| POST   | /hello-world/                   | Post a message to API                         |\n\n## System dependencies\n\nYou should use pyenv to install latest version of python\n\n[https://github.com/pyenv/pyenv](https://github.com/pyenv/pyenv), use the automatic installer: [https://github.com/pyenv/pyenv-installer](https://github.com/pyenv/pyenv-installer)\n\n## Development dependencies\n\n- [flask](https://flask.palletsprojects.com/)\n- [flask-sqlalchemy](https://flask-sqlalchemy.palletsprojects.com/)\n- [flask-marshmallow](https://flask-marshmallow.readthedocs.io/en/latest/)\n- [marshmallow-sqlalchemy](https://marshmallow-sqlalchemy.readthedocs.io/en/latest/)\n\n### 1. Install pyenv\n\n```bash\npip3 install pyenv\n```\n\n### 2. Start pipenv shell\n\n```bash\npipenv shell\n```\n\n### 3. Install Project dependencies\n\n```bash\npipenv install flask flask-sqlalchemy flask-marshmallow marshmallow-sqlalchemy\n```\n\nYou are good to go, start building, now you can run the app inside of pipenv.\n\n### 4. Run inside pipenv\n\nRun server in development mode.\n\n```bash\nexport FLASK_ENV=development\n```\n\nStart development server.\n\n```bash\nflask run\n```\n\nIn the console you should see:\n![console](./.github/screen.png)\n\nNavigate to:\n[http://localhost:5000/hello-world](http://localhost:5000/hello-world)\n\n#### 4.1 Create a db, inside pipenv (only need to do this once one a fresh app.)\n\n```bash\n$ python app.py\n\u003e\u003e from app import db\n\u003e\u003e db.create_all()\n\u003e\u003e exit()\n```\n\n## 🚉 Contributing code\n\nWe will use peer review in the form of Pull Requests. You must make a feature branch before starting to code. The `main` branch must always be clean and deployable at all times, do not work on `main` branch.\n\nLessons on branches and merging can be seen here: [:tv: Watch](https://github.com/Noroff-Fagskole/campus-advisor-training-mannuelf/tree/master/Module%201)\n\n## Contribution Guidelines\n\nWe are using Github Issue and Project board to manage tasks.\n\n[https://github.com/mannuelf/nuc-studio-1-project-backend/issues](https://github.com/mannuelf/nuc-studio-1-project-backend/issues)\n\n[https://github.com/mannuelf/nuc-studio-1-project-backend/projects/1](https://github.com/mannuelf/nuc-studio-1-project-backend/projects/1)\n\n### To contribute:\n\nCreate and issue using the issus board.\n\n1. Assign it to yourself and\n2. Label it using appropriate label\n3. Assign issue to a Project\n![image](https://user-images.githubusercontent.com/210504/116962393-1dd55180-aca6-11eb-83b2-0688cc3dd0aa.png)\n\n### Coding\n\n1. keep `main` branch clean and deployable at all times, do not code on it.\n2. Fork Repo or \n3. if already on the team create a feature branch\n4. Work on your task\n5. Create a Pull Request.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmannuelf%2Fnuc-studio-1-project-backend","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmannuelf%2Fnuc-studio-1-project-backend","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmannuelf%2Fnuc-studio-1-project-backend/lists"}