Giter Site home page Giter Site logo

hmajid2301 / articles Goto Github PK

View Code? Open in Web Editor NEW
69.0 2.0 121.0 31.46 MB

This repo contains all the code examples for my articles

Home Page: https://haseebmajid.dev/blog/

License: MIT License

Python 19.94% Dockerfile 0.54% JavaScript 44.14% Java 3.42% Ruby 3.64% Objective-C 5.44% TypeScript 10.22% Starlark 2.50% HTML 0.86% CSS 7.07% Shell 0.03% Go 2.20%
code-examples

articles's Introduction

articles's People

Contributors

barisx avatar hmajid2301 avatar tbarnier avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

articles's Issues

13. REST API using OpenAPI, Flask & Connexions - app doesn't run

when following the readme the app won't work.

  1. the location to run flask from is incorrect. (should be from "medium\13. REST API using OpenAPI, Flask & Connexions\source_code\test-api\src\test_api")

  2. there is a compile issue due to incorrect file names ( /web/controllers/pet_controller.py should be /web/controllers/pets_controllers.py)

  3. there is an import issue inside pets_controllers.py

as this is a guide to learn the stack please can you supply a working example?

9. Testing with pytest-mock and pytest-flask

On running pytest command from the project root directory, there is an error:
(Also mentioned in the blog post):

E       fixture 'client' not found
>       available fixtures: app, cache, capfd, capfdbinary, caplog, capsys, capsysbinary, doctest_namespace, monkeypatch, pytestconfig, record_property, record_testsuite_property, record_xml_attribute, recwarn, tmp_path, tmp_path_factory, tmpdir, tmpdir_factory
>       use 'pytest --fixtures [testpath]' for help on them.

8. Docker with SQLAlchemy: KeyError: 'POSTGRES_USER'

Cloned the articles repository and followed the instructions to run docker with SQLAlchemy.

After doing flask run, I'm seeing the below error:

--sniped trace:

File "/Users/testing/Desktop/Python/projects/source_code/src/example/__init__.py", line 4, in <module>
    from . import config
  File "/Users/testing/Desktop/Python/projects/source_code/src/example/config.py", line 3, in <module>
    user = os.environ['POSTGRES_USER']
  File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.7/lib/python3.7/os.py", line 678, in __getitem__
    raise KeyError(key) from None
KeyError: 'POSTGRES_USER'

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.