Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
eve - restful api for human
Search
begood
January 24, 2018
Programming
74
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
eve - restful api for human
this is my slide for presenting in python meeting in PYMI and VCCLOUD
begood
January 24, 2018
Other Decks in Programming
See All in Programming
MVNOの申込からeSIM開通までをiOSアプリでつなぐ- 本人確認・MNP・通信事業者基盤をまたぐ実装
satotakeshi
0
450
AHC070解法紹介
eijirou
0
130
Are APIs Still Relevant in the AI Era?
soyuka
0
280
変化を抱擁するドキュメントの作り方 - ビジネスルール駆動開発がもたらす、コードとの新しい関係
ioki
2
220
大喜利で理解するLLM as a Judge / Understanding LLM-as-a-Judge through Ogiri
rockname
0
150
標準パッケージに uuid が追加された 背景から見る Go らしい意思決定 / go_127_uuid_decision
convto
5
7.6k
iOSDC Japan 2026 - Swiftで作って学ぼう!データベース自作入門
kaseken
2
180
Starting & Sustaining Code-Based E2E Testing for Non-Coding QA Teams( #jasstniigata )
teyamagu
PRO
1
450
SONY CISC-NEWS NWS-1750 + NWB-225 フレームバッファの NetBSD/news68k ドライバ実装 / OSC2026Hiroshima
tsutsui
0
120
Family mrubyの進捗
kishima
1
130
20260914 AIエージェント時代のPlatform Engineering LLM基盤とプロダクトの責務境界線
kanfab1
7
2.1k
FreeBSDでZabbixを動かす
kenkino
0
310
Featured
See All Featured
Crafting Experiences
bethany
1
350
Gemini Prompt Engineering: Practical Techniques for Tangible AI Outcomes
mfonobong
2
530
How STYLIGHT went responsive
nonsquared
100
6.3k
Bioeconomy Workshop: Dr. Julius Ecuru, Opportunities for a Bioeconomy in West Africa
akademiya2063
PRO
1
360
Learning to Love Humans: Emotional Interface Design
aarron
275
41k
A Soul's Torment
seathinner
8
3.6k
Why Your Marketing Sucks and What You Can Do About It - Sophie Logan
marketingsoph
0
410
Large-scale JavaScript Application Architecture
addyosmani
515
110k
The Illustrated Guide to Node.js - THAT Conference 2024
reverentgeek
1
510
A brief & incomplete history of UX Design for the World Wide Web: 1989–2019
jct
2
510
Designing for humans not robots
tammielis
254
26k
WCS-LA-2024
lcolladotor
0
830
Transcript
eve RESTful API for humans Quangvn - VCCLOUD
Eve được phát triển bởi
Mục lục: • Phần 1. Đôi điều về eve •
Phần 2. Tính năng • Phần 3. Ưu điểm, nhược điểm
Phần 1. Đôi điều về eve Đơn giản cùng với
setting.py mặc định ở cùng thư mục DOMAIN={“speakers”: {}} from eve import Eve app = Eve() if __name__ == '__main__': app.run()
Run simple $: python2 run.py * Running on http://127.0.0.1:5000/ (Press
CTRL+C to quit)
Call to api $: http GET :5000/blogs
{ "_items": [ ], "_links": { "parent": { "href": "/",
"title": "home" }, "self": { "href": "blogs", "title": "blogs" } }, "_meta": { "max_results": 25, "page": 1, "total": 0 } }
{ "_items": [ ], "_links": { "parent": { "href": "/",
"title": "home" }, "self": { "href": "blogs", "title": "blogs" } }, "_meta": { "max_results": 25, "page": 1, "total": 0 } } Những object trả về
{ "_items": [ ], "_links": { "parent": { "href": "/",
"title": "home" }, "self": { "href": "blogs", "title": "blogs" } }, "_meta": { "max_results": 25, "page": 1, "total": 0 } } Phần HATEOAS
{ "_items": [ ], "_links": { "parent": { "href": "/",
"title": "home" }, "self": { "href": "blogs", "title": "blogs" } }, "_meta": { "max_results": 25, "page": 1, "total": 0 } } Phần phân trang
Chỉnh sửa setting.py DOMAIN={“speakers”: {}} # mongo connection MONGO_HOST =
'localhost' MONGO_PORT = 27017 MONGO_USERNAME = 'eve_admin' MONGO_PASSWORD = 'eve_admin' MONGO_DBNAME = 'eve_demo' # /blogs RESOURCE_METHODS = ['GET', 'POST'] # /blogs/<id> ITEM_METHODS = ['GET', 'PATCH']
Chỉnh sửa schema blogs = { 'item_title': 'blog', 'additional_lookup': {
'url': 'regex("[\w]+")', 'field': 'name' }, 'schema': { 'name': { 'type': 'string', 'minlength': 1, }, 'content': { 'type': 'string', 'minlength': 1, } } }
Phần 2: Tính năng của eve Mongo Filter: ?where={“lastname”: “pymi”}
Phần 2: Tính năng của eve Python Filter: ?where=lastname==”pymi”
Phần 2: Tính năng của eve Sorting: ?sort=-_created (Giảm dần
theo ngày tạo)
Phần 2: Tính năng của eve Pagination: ?max_results=20&page=2
Phần 2: Tính năng của eve Projection: ?projection={“lastname”: 1} (Chỉ
trả về trường lastname)
Phần 2: Tính năng của eve Embedded: ?embedded={“blogs”: 1} (Trả
dữ liệu kèm theo blog)
Phần 3: Ưu điểm, nhược điểm Ưu điểm: • Dễ
sử dụng • Dễ triển khai • Hỗ trợ nhiều tính năng cần thiết để làm ra API • Có nhiều extension
Phần 3: Ưu điểm, nhược điểm Nhược điểm: • Schema
chưa có phần đổi tên trường • Chỉ dành cho API
Q & A
Lời cám ơn!