Coder Social home page Coder Social logo

packtpublishing / building-restful-python-web-services Goto Github PK

View Code? Open in Web Editor NEW
116.0 16.0 77.0 224 KB

Code repository for Building RESTful Python Web Services, published by Packt

License: MIT License

Python 45.90% Mako 0.19% HTML 48.37% JavaScript 4.28% CSS 1.26%

building-restful-python-web-services's Introduction

Building RESTful Python Web Services

This is the code repository for Building RESTful Python Web Services, published by Packt. It contains all the supporting project files necessary to work through the book from start to finish.

Instructions and Navigations

All of the code is organized into folders. Each folder starts with a number followed by the application name. For example, Chapter02.

The code will look like the following:

from django.apps import AppConfig
  class GamesConfig(AppConfig):
    name = 'games'

In order to work with the different samples for Python 3.5.x, you will need any computer with an Intel Core i3 or higher CPU and at least 4 GB RAM. You can work with any of the following operating systems:

  • Windows 7 or greater (Windows 8, Windows 8.1 or Windows 10)
  • macOS Mountain Lion or greater
  • Any Linux version capable of running Python 3.5.x and any modern browser with JavaScript support You will need Python 3.5 or greater installed on your computer.

Related Products

Download a free PDF

If you have already purchased a print or Kindle version of this book, you can get a DRM-free PDF version at no cost.
Simply click on the link to claim your free PDF.

https://packt.link/free-ebook/9781786462251

building-restful-python-web-services's People

Contributors

gebingeorge avatar murtazatinwala avatar packt-itservice avatar packtutkarshr 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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

building-restful-python-web-services's Issues

Cannot POST w/out header

I've been stuck on this for a few days now:
Pg 68 states that "The following is the equivalent curl command. Note that we don't use the -H option and curl will send the data in the default application/x-www-form-urlencoded:"

But when I
curl -iX POST -d '{"name":"Toy Story 4.2","release_date":"2019-05-18T03:02:00.776594Z","game_category":"3D RPG","played":"false"}' localhost:8000/games/
and when I
curl -iX POST -d '{"name":"Toy Story 4.2","release_date":"2019-05-18T03:02:00.776594Z","game_category":"3D RPG","played":"false"}' -H "Content-Type: application/x-www-form-urlencoded" localhost:8000/games/
I get

HTTP/1.1 400 Bad Request
Date: Sat, 29 Sep 2018 20:51:38 GMT
Server: WSGIServer/0.2 CPython/3.6.5
Content-Type: application/json
Vary: Accept, Cookie
Allow: GET, OPTIONS, POST
X-Frame-Options: SAMEORIGIN
Content-Length: 44

{"release_date":["This field is required."]}

Directory structure is not the same as suggested in the book

There is no games/models.py file or other folders...

django-admin.py startproject gamesapi
(Django01) w@w-MacBook-Pro gamesapi % tree             
.
├── gamesapi
│   ├── __init__.py
│   ├── asgi.py
│   ├── settings.py
│   ├── urls.py
│   └── wsgi.py
└── manage.py

1 directory, 6 files
(Django01) w@w-MacBook-Pro gamesapi % 

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.