1 Star 0 Fork 0

暴走_不可不贱 / dji-nofly

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
AirMapDataServer.py 696 Bytes
一键复制 编辑 原始数据 按行查看 历史
powervision 提交于 2022-09-14 14:01 . 分享创造,共同成长
# -*- coding: utf-8 -*-
import json
import time
import uuid
from bson.json_util import dumps
from pymongo import MongoClient
class MapService:
client = MongoClient('127.0.0.1', 27018)
def __init__(self):
self.client = MongoClient('127.0.0.1', 27018)
# 获取DJI单个国家的数据
def queryDJIForCountry(self, countryCode):
mongod = self.client['NoFly']
collection = mongod['DjiAreas4']
result = []
for d in collection.find({"sub_areas":{"$ne":None, "$exists": True },"country" : countryCode}):
result.append(d)
# result = dumps(collection.find().limit(100)) # 查询mongodb
return json.dumps(result)
Python
1
https://gitee.com/cierqiu/dji-nofly.git
git@gitee.com:cierqiu/dji-nofly.git
cierqiu
dji-nofly
dji-nofly
master

搜索帮助