Giter Site home page Giter Site logo

php-python-cal's Introduction

Two ways build a Calculator

https://python-poetry.org/docs/?ref=dylancastillo.co#installing-with-the-official-installer

Using Python Virtual Environment

python -m venv .venv
source .venv/bin/activate

Using Poetry: Create the virtual environment in the same directory as the project and install the dependencies:

poetry config virtualenvs.in-project true
poetry init
poetry add fastapi
poetry add uvicorn
poetry add pytz

Jquery UI <----> REST API

UI : http://localhost:3000/php-python-cal/php-restapi/main.html
API : http://localhost:7777/docs#/default/calculate_cal_post

Alt text

Pytest

.venv) (base) ➜  php-restapi git:(master) ✗ pytest -v tests 
=========================================================== test session starts ============================================================
platform darwin -- Python 3.9.7, pytest-7.0.1, pluggy-0.13.1 -- /Users/euiyoung.hwang/opt/anaconda3/bin/python
cachedir: .pytest_cache
rootdir: /Users/euiyoung.hwang/ES/Python_Workspace/php-python-cal/php-restapi
plugins: anyio-3.6.1, mock-3.6.1, cov-4.0.0
collected 8 items                                                                                                                          

tests/test_cal.py::test_cal[1-1-+-2] PASSED                                                                                          [ 12%]
tests/test_cal.py::test_cal[1-1---0] PASSED                                                                                          [ 25%]
tests/test_cal.py::test_cal[1-1-*-1] PASSED                                                                                          [ 37%]
tests/test_cal.py::test_cal[1-1-/-1] PASSED                                                                                          [ 50%]
tests/test_cal.py::test_cal[2-2-+-4] PASSED                                                                                          [ 62%]
tests/test_cal.py::test_cal[2-2---0] PASSED                                                                                          [ 75%]
tests/test_cal.py::test_cal[2-2-*-4] PASSED                                                                                          [ 87%]
tests/test_cal.py::test_cal[2-2-/-1] PASSED            

php-python-cal's People

Watchers

 avatar

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.