上一页 1 ··· 6 7 8 9 10 11 12 13 14 ··· 33 下一页
摘要: 环境 python:3.8 es:7.8.0 环境安装 pip install elasticsearch==7.8.0 from elasticsearch import Elasticsearch #环境 python:3.8 es:7.8.0 #环境安装 #pip install elasti 阅读全文
posted @ 2023-02-23 18:12 万笑佛 阅读(436) 评论(0) 推荐(0)
摘要: 示例代码环境 python:3.8 es:7.8.0环境安装 pip install elasticsearch==7.8.0 from elasticsearch import Elasticsearch #1、创建ES对象,创建连接 es = Elasticsearch(['127.0.0.1: 阅读全文
posted @ 2023-02-23 18:10 万笑佛 阅读(604) 评论(0) 推荐(0)
摘要: 一、环境安装 基本环境: Python环境:Python 3.8.16 Django环境:4.1 redis环境:参考搭建 https://www.cnblogs.com/yclh/p/14742336.html 并且已经添加了myApp的应用 安装redis的包: pip install djan 阅读全文
posted @ 2023-02-16 18:56 万笑佛 阅读(255) 评论(0) 推荐(0)
摘要: 一、基本环境 1、开发环境: Python环境:Python 3.8.16 Django环境:4.1 2、需要安装的包 pip install pymongo pip install mongoengine 二、开发参数配置 1、先创建一个mongoApp的应用 2、引入mongoApp2的urls 阅读全文
posted @ 2023-02-16 18:52 万笑佛 阅读(134) 评论(0) 推荐(0)
摘要: 一、基本环境 1、开发环境: Python环境:Python 3.8.16 Django环境:4.1 2、需要安装的包 pip install pymongo pip install mongoengine 二、开发参数配置 1、先创建一个mongoApp的应用 2、增加mongo库的连接 3、创建 阅读全文
posted @ 2023-02-16 18:50 万笑佛 阅读(139) 评论(0) 推荐(0)
摘要: # pip install pyyaml 环境里先安装包import xml.dom.minidom dom = xml.dom.minidom.parse('config.xml') root = dom.documentElement def xml(suser): suser = root.g 阅读全文
posted @ 2023-02-16 18:38 万笑佛 阅读(101) 评论(0) 推荐(0)
摘要: import json #str >json str = '{"name": "御姐", "age": 18}' j = json.loads(str) print(j) print(type(j)) #str >json >str str = '{"name": "御姐", "age": 18}' 阅读全文
posted @ 2023-02-16 18:36 万笑佛 阅读(23) 评论(0) 推荐(0)
摘要: #1、打开文件 如果文件不存在会报错 file = open("1.txt") #2、使用w、w+、a、a+模式打开,如果文件不存在就创建文件 file = open("1.txt", "w") #3、指定绝对路径路径 file = open("D:\\1.txt", "w") #二进制模式打开图片 阅读全文
posted @ 2023-02-16 18:27 万笑佛 阅读(72) 评论(0) 推荐(0)
摘要: 四、创建应用 一个项目里可以创建多个应用,每个应用进行一种业务处理 (1)激活当前项目的环境 D:\pythonProject2023\djangoProject>activate python3.8forDjango (python3.8forDjango) D:\pythonProject202 阅读全文
posted @ 2023-02-16 18:20 万笑佛 阅读(122) 评论(0) 推荐(0)
摘要: 一、 创建django项目 1、pycharm工具创建 这种方式django会是默认最新版本的 2、命令行创建 (1)创建新的开发环境 conda create --name python3.8test python=3.8 (2)激活开发环境 activate python3.8test (3)查 阅读全文
posted @ 2023-02-16 18:10 万笑佛 阅读(82) 评论(0) 推荐(0)
上一页 1 ··· 6 7 8 9 10 11 12 13 14 ··· 33 下一页