Stay Hungry,Stay Foolish!

上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 22 下一页
摘要: background 基于django和react构建开发环境: django+restframework作为后台API提供者 react+ant design作为前端UI框架 利用django和react的开发工具的热更新功能, 实现前后台代码更新都不需要手动重启server。 如下拓扑图。 首先 阅读全文
posted @ 2021-10-31 09:55 lightsong 阅读(30) 评论(0) 推荐(0) 编辑
摘要: type annotations https://docs.python.org/3.6/library/typing.html 为类类型提示(IDE or 人类可读)设计, 又叫类型注解。 typing — Support for type hints This module supports t 阅读全文
posted @ 2021-10-26 14:59 lightsong 阅读(43) 评论(0) 推荐(0) 编辑
摘要: Draw and Guess Game https://github.com/fanqingsong/draw_guess draw and guess based on django_channels_chat_official_tutorial_react project, create dra 阅读全文
posted @ 2021-10-24 11:23 lightsong 阅读(62) 评论(0) 推荐(0) 编辑
摘要: Invoke https://docs.pyinvoke.org/en/stable/ The invoke CLI tool Details on the CLI interface to Invoke, available core flags, and tab completion optio 阅读全文
posted @ 2021-10-21 15:26 lightsong 阅读(35) 评论(0) 推荐(0) 编辑
摘要: Django Channels Django 仅仅支持 HTTP协议, Channels 扩展了支持的协议类型, 例如 websocket,chat, IoT. 本身实现基于ASGI协议。 但是你也可以选择 同步模式。 https://channels.readthedocs.io/en/stabl 阅读全文
posted @ 2021-10-20 17:28 lightsong 阅读(69) 评论(0) 推荐(0) 编辑
摘要: OverView Django View -- Root https://docs.djangoproject.com/en/3.2/ref/class-based-views/base/#view 所有view视图的基类, 此类不是通用视图,被业务视图继承。 class django.views. 阅读全文
posted @ 2021-10-17 23:40 lightsong 阅读(47) 评论(0) 推荐(0) 编辑
摘要: ViewSets & Routers https://www.django-rest-framework.org/tutorial/6-viewsets-and-routers/ ViewSets是对模型的高度抽象, 让开发者聚焦于建模状态, 和 接口的交互, 基于通用的规则构建URL. REST 阅读全文
posted @ 2021-10-13 00:08 lightsong 阅读(41) 评论(0) 推荐(0) 编辑
摘要: Relationships & Hyperlinked APIs https://www.django-rest-framework.org/tutorial/5-relationships-and-hyperlinked-apis/ 对于表之间的关联关系, ModelSerializer 默认是使 阅读全文
posted @ 2021-10-12 23:39 lightsong 阅读(32) 评论(0) 推荐(0) 编辑
摘要: Authentication & Permissions https://www.django-rest-framework.org/tutorial/4-authentication-and-permissions/ 对于view需要限制用户的访问权限, 例如认证 和 许可。 Currently 阅读全文
posted @ 2021-10-12 23:21 lightsong 阅读(46) 评论(0) 推荐(0) 编辑
摘要: Class-based Views https://www.django-rest-framework.org/tutorial/3-class-based-views/ APIView 继承于 django view类提供了 http method 方法的抽象, 即继承于此类的应用类中, 可以定义 阅读全文
posted @ 2021-10-12 22:30 lightsong 阅读(45) 评论(0) 推荐(0) 编辑
摘要: Requests and Responses https://www.django-rest-framework.org/tutorial/2-requests-and-responses/ Request 请求类,扩展了 httprequest类。 请求数据存储在 request.data 成员中 阅读全文
posted @ 2021-10-12 15:18 lightsong 阅读(28) 评论(0) 推荐(0) 编辑
摘要: Django REST framework Django 支持MTV模式, 前端渲染的内容,放在了后端 template中实施,包括获取数据,渲染模板一系列过程都在候选执行。 在前端能力强大的现在, 前后端分离开发模式已经成为主流, 所以后端只提供API, 于前端进行数据交互,成为业界主流。 此框架 阅读全文
posted @ 2021-10-12 15:06 lightsong 阅读(40) 评论(0) 推荐(0) 编辑
摘要: Metaclasses https://www.python.org/dev/peps/pep-3115/ 元类的诞生是来自于大量有趣的用例, 要求在类创建的过程中,就可以参与到类的定制逻辑中去。 The primary reason for changing the way metaclasses 阅读全文
posted @ 2021-10-10 23:50 lightsong 阅读(22) 评论(0) 推荐(0) 编辑
摘要: https://docs.djangoproject.com/en/3.2/misc/design-philosophies/#cache-design-philosophy Loose coupling 低耦合 高内聚-低耦合是其设计目标。 不同的层不需要知道其它层, 除非是绝对必要。 例如: 模 阅读全文
posted @ 2021-10-01 22:49 lightsong 阅读(32) 评论(0) 推荐(0) 编辑
摘要: Architecture 实现前后端分离架构: 网页静态资源, 由nginx直接响应。 DJANGO脚本资源的请求, 由uWSGI服务器处理。 https://decovar.dev/blog/2019/11/03/nginx-uwsgi-python-scripts/#nginx-server-c 阅读全文
posted @ 2021-09-26 00:42 lightsong 阅读(89) 评论(0) 推荐(0) 编辑
摘要: master-worker模式 https://blog.csdn.net/u012845099/article/details/78463324 Master-Worker模式是常用的并行模式之一,它的核心思想是,系统有两个进程协作工作:Master进程,负责接收和分配任务;Worker进程,负责 阅读全文
posted @ 2021-09-24 11:23 lightsong 阅读(376) 评论(0) 推荐(0) 编辑
摘要: Supervisor 是一个CS架构的软件系统, 支持用户监控和控制大量的进程, 具有跨系统性, 在所有的类UNIX系统上。 不是对系统驻守进程管理器的代替, 它的目的是用用控制一个项目或者用户相关的进程。 此进程在系统初始化时候启动。 http://supervisord.org/index.ht 阅读全文
posted @ 2021-09-22 16:23 lightsong 阅读(76) 评论(0) 推荐(0) 编辑
摘要: Buffon's Needle https://mste.illinois.edu/activity/buffon/ 介绍 + 模拟 Buffon's Needle is one of the oldest problems in the field of geometrical probabili 阅读全文
posted @ 2021-08-12 00:47 lightsong 阅读(259) 评论(0) 推荐(0) 编辑
摘要: dest https://docs.python.org/3/library/argparse.html#dest dest用于指定解析后将参数值,存储到参数表中的参数名称, 简称存储参数名。 dest本身是add_argument参数之一 The name of this attribute is 阅读全文
posted @ 2021-08-09 22:04 lightsong 阅读(70) 评论(0) 推荐(0) 编辑
摘要: Integration with FastAPI and APScheduler https://www.cnblogs.com/lightsong/p/15054120.html 上篇博文,介绍了如何给 API Server添加 APScheduler, 以便之后后台的定时任务。 但是这里有一个问 阅读全文
posted @ 2021-08-08 00:23 lightsong 阅读(487) 评论(0) 推荐(0) 编辑
摘要: Getting Started With Async Features in Python https://realpython.com/python-async-features/#:~:text=%20Using%20Python%20Async%20Features%20in%20Practi 阅读全文
posted @ 2021-08-07 21:58 lightsong 阅读(49) 评论(0) 推荐(0) 编辑
摘要: Background 大部分的框架,要么只支持 restful API, 要么只支持CLI。 例如: fastapi 或者 django_rest_framework 支持rest API click 支持将函数装饰为 CLI 特殊情况,需要两种都要支持。即一份代码, 同时支持两种接口。 hug就是 阅读全文
posted @ 2021-08-03 23:56 lightsong 阅读(123) 评论(0) 推荐(0) 编辑
摘要: supplychain on blockchain 每个公司都有自己的供应链, 过程中产生的交易数据, 如果存在其中参与方的一方服务器中, 并不能像银行的一样, 能够给各方产生一个信任的效果,因为任何一方都会担心数据的拥有这改变数据。 区块链天生具有不可篡改, 去中心化的特性, 可以解决供应链中各个 阅读全文
posted @ 2021-08-03 17:59 lightsong 阅读(73) 评论(0) 推荐(0) 编辑
摘要: xstate https://xstate.js.org/docs/ https://github.com/statelyai/xstate 为现代的web提供有限状态机功能。 JavaScript and TypeScript finite state machines (opens new wi 阅读全文
posted @ 2021-08-02 23:09 lightsong 阅读(329) 评论(0) 推荐(0) 编辑
摘要: PI https://www.mathsisfun.com/numbers/pi.html Draw a circle with a diameter (all the way across the circle) of 1 Then the circumference (all the way a 阅读全文
posted @ 2021-08-01 22:14 lightsong 阅读(1149) 评论(0) 推荐(0) 编辑
摘要: Gunicorn https://docs.gunicorn.org/en/latest/index.html https://github.com/benoitc/gunicorn Gunicorn ‘Green Unicorn’ is a Python WSGI HTTP Server for 阅读全文
posted @ 2021-07-25 00:26 lightsong 阅读(207) 评论(0) 推荐(0) 编辑
摘要: AIOHTTP https://docs.aiohttp.org/en/stable/ 异步HTTP客户端和服务器,为asyncio 设计。 因为 作为客户端的 requests 支持同步请求模式, 一个请求完成后,才能执行下一个请求。 Asynchronous HTTP Client/Server 阅读全文
posted @ 2021-07-24 17:45 lightsong 阅读(138) 评论(0) 推荐(0) 编辑
摘要: API Server with Scheduler 一般API服务器,仅仅提供API接口, 执行单次业务逻辑的执行。 如果在API服务器后台,执行定时执行功能, 让后台承担业务逻辑的定时执行功能, 添加APScheduler库。 FastAPI https://fastapi.tiangolo.co 阅读全文
posted @ 2021-07-23 22:55 lightsong 阅读(1215) 评论(0) 推荐(0) 编辑
摘要: APScheduler https://github.com/agronholm/apscheduler 高级的python sheduler Advanced Python Scheduler (APScheduler) is a Python library that lets you sche 阅读全文
posted @ 2021-07-21 17:04 lightsong 阅读(93) 评论(0) 推荐(0) 编辑
摘要: prefect https://github.com/PrefectHQ/prefect https://docs.prefect.io/ Prefect We've rebuilt data engineering for the data science era. Prefect is a ne 阅读全文
posted @ 2021-07-20 16:51 lightsong 阅读(135) 评论(0) 推荐(0) 编辑
摘要: FastAPI https://fastapi.tiangolo.com/#performance FastAPI is a modern, fast (high-performance), web framework for building APIs with Python 3.6+ based 阅读全文
posted @ 2021-07-16 14:55 lightsong 阅读(121) 评论(0) 推荐(0) 编辑
摘要: REST API https://airflow.apache.org/docs/apache-airflow/stable/stable-rest-api-ref.html#section/Overview 为了利于管理, 支持了REST API。 To facilitate management 阅读全文
posted @ 2021-07-09 16:50 lightsong 阅读(1223) 评论(0) 推荐(0) 编辑
摘要: API https://docs.python.org/3/library/datetime.html#datetime.datetime.now now接口获取本地时间, tz不带表示当地时区, 带上可以指定特定时区。 utcnow获取世界协调时间 classmethod datetime.now 阅读全文
posted @ 2021-07-08 15:26 lightsong 阅读(106) 评论(0) 推荐(0) 编辑
摘要: setTimeout https://docs.python.org/3.6/library/sched.html The sched module defines a class which implements a general purpose event scheduler: class s 阅读全文
posted @ 2021-07-08 14:15 lightsong 阅读(73) 评论(0) 推荐(0) 编辑
摘要: SQLite Database https://airflow.apache.org/docs/apache-airflow/stable/howto/set-up-database.html#setting-up-a-sqlite-database 用于开发环境,有一些限制,只支持 序列执行器, 阅读全文
posted @ 2021-07-05 15:04 lightsong 阅读(163) 评论(0) 推荐(0) 编辑
摘要: HeidiSQL https://github.com/HeidiSQL/HeidiSQL HeidiSQL is a graphical interface for managing MariaDB or MySQL servers, Microsoft SQL databases, Postgr 阅读全文
posted @ 2021-07-05 12:19 lightsong 阅读(238) 评论(0) 推荐(0) 编辑
摘要: ethers.js https://docs.ethers.io/v5/ 一个完备的,紧致的JS库,可以和以太坊区块链和其生态进行交互。 What is Ethers? The ethers.js library aims to be a complete and compact library f 阅读全文
posted @ 2021-06-17 11:33 lightsong 阅读(448) 评论(0) 推荐(0) 编辑
摘要: Solidity https://docs.soliditylang.org/en/latest/index.html 实现智能合约的语言, 面向对象。 智能合约是运行在以太坊平台上的程序, 管理账户的行为和以太状态。 是一种花括号语言,类似 C++ PYTHON JAVASCRIPT. 静态类型, 阅读全文
posted @ 2021-06-17 10:23 lightsong 阅读(411) 评论(0) 推荐(0) 编辑
摘要: Rimble https://rimble.consensys.design/ Rimble is an open-source library of React components and guides to help you make dApps everyone can use. 去中心化应 阅读全文
posted @ 2021-06-16 16:56 lightsong 阅读(127) 评论(0) 推荐(0) 编辑
摘要: https://zhuanlan.zhihu.com/p/37782868 芒种 是二十四节气中的第九个节气,每年的6月5日左右,意思是:有芒的麦子快收,有芒的稻子可种。 这个节气的“忙”可谓名副其实。到了这个时节,夏季也将转入景色最美好的一段时期。 https://baike.baidu.com/ 阅读全文
posted @ 2021-06-07 15:02 lightsong 阅读(92) 评论(0) 推荐(0) 编辑
上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 22 下一页
Life Is Short, We Need Ship To Travel