diff --git a/LICENSE.md b/LICENSE.md new file mode 100644 index 00000000..0e25ef3b --- /dev/null +++ b/LICENSE.md @@ -0,0 +1,7 @@ +Copyright 2015-2016 WebODM Contributors + +Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. \ No newline at end of file diff --git a/nodeodm/__init__.py b/nodeodm/__init__.py new file mode 100644 index 00000000..142124f9 --- /dev/null +++ b/nodeodm/__init__.py @@ -0,0 +1 @@ +from api_client import * \ No newline at end of file diff --git a/nodeodm/admin.py b/nodeodm/admin.py new file mode 100644 index 00000000..8c38f3f3 --- /dev/null +++ b/nodeodm/admin.py @@ -0,0 +1,3 @@ +from django.contrib import admin + +# Register your models here. diff --git a/nodeodm/api_client.py b/nodeodm/api_client.py new file mode 100644 index 00000000..e38d8182 --- /dev/null +++ b/nodeodm/api_client.py @@ -0,0 +1,11 @@ +""" +A wrapper around Bravado to communicate with a node-OpenDroneMap node. +""" +from bravado.client import SwaggerClient + +class ApiClient: + def __init__(self, host, port): + # TODO + client = SwaggerClient.from_url('http://{}:{}/swagger.json'.format(host, port)) + print client.server.get_info().result() + print dir(client) diff --git a/nodeodm/apps.py b/nodeodm/apps.py new file mode 100644 index 00000000..6244ad05 --- /dev/null +++ b/nodeodm/apps.py @@ -0,0 +1,7 @@ +from __future__ import unicode_literals + +from django.apps import AppConfig + + +class NodeodmConfig(AppConfig): + name = 'nodeodm' diff --git a/nodeodm/migrations/__init__.py b/nodeodm/migrations/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/nodeodm/models.py b/nodeodm/models.py new file mode 100644 index 00000000..bd4b2abe --- /dev/null +++ b/nodeodm/models.py @@ -0,0 +1,5 @@ +from __future__ import unicode_literals + +from django.db import models + +# Create your models here. diff --git a/nodeodm/tests.py b/nodeodm/tests.py new file mode 100644 index 00000000..7ce503c2 --- /dev/null +++ b/nodeodm/tests.py @@ -0,0 +1,3 @@ +from django.test import TestCase + +# Create your tests here. diff --git a/nodeodm/views.py b/nodeodm/views.py new file mode 100644 index 00000000..91ea44a2 --- /dev/null +++ b/nodeodm/views.py @@ -0,0 +1,3 @@ +from django.shortcuts import render + +# Create your views here. diff --git a/requirements.txt b/requirements.txt index 734972c2..484e2a2f 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,7 +1,32 @@ -Django==1.10 -PyYAML==3.12 anyjson==0.3.3 +attrs==16.2.0 +bravado==8.3.0 +bravado-core==4.5.0 +cffi==1.8.3 +crochet==1.5.0 +cryptography==1.5 +Django==1.10 +enum34==1.1.6 +fido==3.2.0 +functools32==3.2.3.post2 +idna==2.1 +ipaddress==1.0.17 +jsonschema==2.5.1 pillow==3.3.1 psycopg2==2.6.2 +pyasn1==0.1.9 +pyasn1-modules==0.0.8 +pycparser==2.14 +pyOpenSSL==16.1.0 +python-dateutil==2.5.3 pytz==2016.6.1 -wsgiref==0.1.2 +PyYAML==3.12 +requests==2.11.1 +service-identity==16.0.0 +simplejson==3.8.2 +six==1.10.0 +swagger-spec-validator==2.0.2 +Twisted==16.4.1 +yelp-bytes==0.3.0 +yelp-encodings==0.1.3 +zope.interface==4.3.2 diff --git a/webodm/settings.py b/webodm/settings.py index f9771691..ee7db66e 100644 --- a/webodm/settings.py +++ b/webodm/settings.py @@ -38,6 +38,7 @@ INSTALLED_APPS = [ 'django.contrib.messages', 'django.contrib.staticfiles', 'app', + 'nodeodm' ] MIDDLEWARE = [