Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

python

NotificationsYou must be signed in to change notification settings

nanic/python-rest-api-docker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

steps to run the sample rest service on docker -

  1. Clone the Repository - git clonehttps://github.com/nanic/python-rest-api-docker.git

  2. Move to the directory - cd python-rest-api-docker

  3. Build the docker image - docker build -t python-rest .

  4. Create and run a container - docker run -d -p 5000:5000 python-rest

  5. Navigate tohttp://0.0.0.0:5000/ to get hello world'd

Note: If the image is built inside a private network, you can mention gateway to proxy throughEx: docker build --build-arg proxy=hostname:port -t python-rest .

A Sample Client --

import requestsr = requests.post('http://0.0.0.0:5000/v1/api',verify=False, json={"name": "naren"})headers = {'Content-type': 'application/json'}print(r.status_code)if r.ok:print r.content

About

python

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp