From 88ea419c20186e74dcd9c8dd4190fbccc8c89852 Mon Sep 17 00:00:00 2001 From: Peter Kotyczka Date: Thu, 4 Apr 2024 09:21:45 +0200 Subject: [PATCH] pyapp structure --- .gitignore | 4 +- demo/app/address.py | 66 ---------- demo/app/basic.py | 47 ------- demo/app/config.py | 5 - demo/app/dice.py | 17 --- demo/app/edit.py | 94 ------------- .../queue/__pycache__/config.cpython-311.pyc | Bin 212 -> 0 bytes demo/app/queue/ampq_client.py | 45 ------- demo/app/queue/ampq_receiver.py | 29 ---- demo/app/queue/ampq_sender.py | 52 -------- demo/app/queue/ampq_server.py | 51 ------- demo/app/queue/client_http.py | 96 -------------- demo/app/queue/config.py | 5 - demo/app/queue/connect.json | 0 demo/app/queue/db_receive.py | 79 ----------- demo/app/queue/db_send.py | 110 ---------------- demo/app/queue/send.py | 6 - demo/app/queue/test.py | 39 ------ demo/app/temp.py | 41 ------ demo/db.sqlite3 | Bin 143360 -> 0 bytes demo/demo/__init__.py | 0 demo/demo/api-client.py | 10 -- demo/demo/asgi.py | 16 --- demo/demo/settings.py | 124 ------------------ demo/demo/urls.py | 27 ---- demo/demo/wsgi.py | 16 --- demo/manage.py | 22 ---- demo/migration/__init__.py | 0 demo/migration/admin.py | 5 - demo/migration/apps.py | 6 - demo/migration/migrations/0001_initial.py | 33 ----- ...hoppingitem_price_shoppingitem_quantity.py | 24 ---- demo/migration/migrations/__init__.py | 0 .../__pycache__/0001_initial.cpython-311.pyc | Bin 1670 -> 0 bytes ...rice_shoppingitem_quantity.cpython-311.pyc | Bin 1101 -> 0 bytes .../__pycache__/__init__.cpython-311.pyc | Bin 196 -> 0 bytes demo/migration/models.py | 18 --- demo/migration/serializers.py | 7 - demo/migration/tests.py | 3 - demo/migration/urls.py | 8 -- demo/migration/views.py | 37 ------ demo/queue/queue_consumer.py | 22 ---- demo/queue/queue_producer.py | 23 ---- demo/starter/demo_native_starter.sh | 3 - {app => pyapp}/db.sqlite3 | Bin {app => pyapp}/manage.py | 0 {app => pyapp}/pyapp/__init__.py | 0 .../__pycache__/__init__.cpython-311.pyc | Bin pyapp/pyapp/__pycache__/admin.cpython-311.pyc | Bin 0 -> 396 bytes pyapp/pyapp/__pycache__/apps.cpython-311.pyc | Bin 0 -> 549 bytes .../pyapp/__pycache__/models.cpython-311.pyc | Bin 0 -> 1773 bytes .../__pycache__/settings.cpython-311.pyc | Bin .../pyapp/__pycache__/urls.cpython-311.pyc | Bin .../pyapp/__pycache__/wsgi.cpython-311.pyc | Bin {app => pyapp}/pyapp/admin.py | 0 .../pyapp/api/__pycache__}/api-client.py | 0 .../api/__pycache__/config.cpython-311.pyc | Bin {app => pyapp}/pyapp/apps.py | 0 {app => pyapp}/pyapp/asgi.py | 0 {app => pyapp}/pyapp/models.py | 0 .../queue/__pycache__/config.cpython-311.pyc | Bin {app/api => pyapp/pyapp}/queue/ampq_client.py | 0 .../pyapp}/queue/ampq_receiver.py | 0 {app/api => pyapp/pyapp}/queue/ampq_sender.py | 0 {app/api => pyapp/pyapp}/queue/ampq_server.py | 0 {app/api => pyapp/pyapp}/queue/client_http.py | 0 {app/api => pyapp/pyapp/queue}/config.py | 0 {app/api => pyapp/pyapp}/queue/connect.json | 0 {app/api => pyapp/pyapp}/queue/db_receive.py | 0 {app/api => pyapp/pyapp}/queue/db_send.py | 0 {app => pyapp}/pyapp/queue/queue_consumer.py | 0 {app => pyapp}/pyapp/queue/queue_producer.py | 0 {app/api => pyapp/pyapp}/queue/send.py | 0 {app/api => pyapp/pyapp}/queue/test.py | 0 {app => pyapp}/pyapp/serializers.py | 0 {app => pyapp}/pyapp/settings.py | 0 {app => pyapp}/pyapp/templates/pyapp.html | 4 +- {app => pyapp}/pyapp/tests.py | 0 {app => pyapp}/pyapp/urls.py | 0 {app => pyapp}/pyapp/views.py | 0 {app/api => pyapp/pyapp/window}/address.py | 0 {app/api => pyapp/pyapp/window}/basic.py | 0 .../queue => pyapp/pyapp/window}/config.py | 0 {app/api => pyapp/pyapp/window}/dice.py | 0 {app/api => pyapp/pyapp/window}/edit.py | 0 {app/api => pyapp/pyapp/window}/temp.py | 0 {app => pyapp}/pyapp/wsgi.py | 0 {demo => pyapp}/starter/build.sh | 0 {app => pyapp}/starter/demo_native_starter.sh | 0 89 files changed, 4 insertions(+), 1190 deletions(-) delete mode 100755 demo/app/address.py delete mode 100755 demo/app/basic.py delete mode 100755 demo/app/config.py delete mode 100755 demo/app/dice.py delete mode 100755 demo/app/edit.py delete mode 100755 demo/app/queue/__pycache__/config.cpython-311.pyc delete mode 100755 demo/app/queue/ampq_client.py delete mode 100755 demo/app/queue/ampq_receiver.py delete mode 100755 demo/app/queue/ampq_sender.py delete mode 100755 demo/app/queue/ampq_server.py delete mode 100755 demo/app/queue/client_http.py delete mode 100755 demo/app/queue/config.py delete mode 100755 demo/app/queue/connect.json delete mode 100755 demo/app/queue/db_receive.py delete mode 100755 demo/app/queue/db_send.py delete mode 100755 demo/app/queue/send.py delete mode 100755 demo/app/queue/test.py delete mode 100755 demo/app/temp.py delete mode 100755 demo/db.sqlite3 delete mode 100755 demo/demo/__init__.py delete mode 100755 demo/demo/api-client.py delete mode 100755 demo/demo/asgi.py delete mode 100755 demo/demo/settings.py delete mode 100755 demo/demo/urls.py delete mode 100755 demo/demo/wsgi.py delete mode 100755 demo/manage.py delete mode 100755 demo/migration/__init__.py delete mode 100755 demo/migration/admin.py delete mode 100755 demo/migration/apps.py delete mode 100755 demo/migration/migrations/0001_initial.py delete mode 100755 demo/migration/migrations/0002_shoppingitem_price_shoppingitem_quantity.py delete mode 100755 demo/migration/migrations/__init__.py delete mode 100755 demo/migration/migrations/__pycache__/0001_initial.cpython-311.pyc delete mode 100755 demo/migration/migrations/__pycache__/0002_shoppingitem_price_shoppingitem_quantity.cpython-311.pyc delete mode 100755 demo/migration/migrations/__pycache__/__init__.cpython-311.pyc delete mode 100755 demo/migration/models.py delete mode 100755 demo/migration/serializers.py delete mode 100755 demo/migration/tests.py delete mode 100755 demo/migration/urls.py delete mode 100755 demo/migration/views.py delete mode 100755 demo/queue/queue_consumer.py delete mode 100755 demo/queue/queue_producer.py delete mode 100755 demo/starter/demo_native_starter.sh rename {app => pyapp}/db.sqlite3 (100%) rename {app => pyapp}/manage.py (100%) rename {app => pyapp}/pyapp/__init__.py (100%) rename {app => pyapp}/pyapp/__pycache__/__init__.cpython-311.pyc (100%) create mode 100644 pyapp/pyapp/__pycache__/admin.cpython-311.pyc create mode 100644 pyapp/pyapp/__pycache__/apps.cpython-311.pyc create mode 100644 pyapp/pyapp/__pycache__/models.cpython-311.pyc rename {app => pyapp}/pyapp/__pycache__/settings.cpython-311.pyc (100%) rename {app => pyapp}/pyapp/__pycache__/urls.cpython-311.pyc (100%) rename {app => pyapp}/pyapp/__pycache__/wsgi.cpython-311.pyc (100%) rename {app => pyapp}/pyapp/admin.py (100%) rename {app/pyapp => pyapp/pyapp/api/__pycache__}/api-client.py (100%) rename {app => pyapp/pyapp}/api/__pycache__/config.cpython-311.pyc (100%) rename {app => pyapp}/pyapp/apps.py (100%) rename {app => pyapp}/pyapp/asgi.py (100%) rename {app => pyapp}/pyapp/models.py (100%) rename {app/api => pyapp/pyapp}/queue/__pycache__/config.cpython-311.pyc (100%) rename {app/api => pyapp/pyapp}/queue/ampq_client.py (100%) rename {app/api => pyapp/pyapp}/queue/ampq_receiver.py (100%) rename {app/api => pyapp/pyapp}/queue/ampq_sender.py (100%) rename {app/api => pyapp/pyapp}/queue/ampq_server.py (100%) rename {app/api => pyapp/pyapp}/queue/client_http.py (100%) rename {app/api => pyapp/pyapp/queue}/config.py (100%) rename {app/api => pyapp/pyapp}/queue/connect.json (100%) rename {app/api => pyapp/pyapp}/queue/db_receive.py (100%) rename {app/api => pyapp/pyapp}/queue/db_send.py (100%) rename {app => pyapp}/pyapp/queue/queue_consumer.py (100%) rename {app => pyapp}/pyapp/queue/queue_producer.py (100%) rename {app/api => pyapp/pyapp}/queue/send.py (100%) rename {app/api => pyapp/pyapp}/queue/test.py (100%) rename {app => pyapp}/pyapp/serializers.py (100%) rename {app => pyapp}/pyapp/settings.py (100%) rename {app => pyapp}/pyapp/templates/pyapp.html (96%) rename {app => pyapp}/pyapp/tests.py (100%) rename {app => pyapp}/pyapp/urls.py (100%) rename {app => pyapp}/pyapp/views.py (100%) rename {app/api => pyapp/pyapp/window}/address.py (100%) rename {app/api => pyapp/pyapp/window}/basic.py (100%) rename {app/api/queue => pyapp/pyapp/window}/config.py (100%) rename {app/api => pyapp/pyapp/window}/dice.py (100%) rename {app/api => pyapp/pyapp/window}/edit.py (100%) rename {app/api => pyapp/pyapp/window}/temp.py (100%) rename {app => pyapp}/pyapp/wsgi.py (100%) rename {demo => pyapp}/starter/build.sh (100%) rename {app => pyapp}/starter/demo_native_starter.sh (100%) diff --git a/.gitignore b/.gitignore index f5f624c..1b3c26e 100755 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,3 @@ virtualenv -app/queue/data/* -app/*/__pycache__ +pyapp/queue/data/* +pyapp/*/__pycache__ diff --git a/demo/app/address.py b/demo/app/address.py deleted file mode 100755 index e8b39da..0000000 --- a/demo/app/address.py +++ /dev/null @@ -1,66 +0,0 @@ -import tkinter as tk - -# Create a new window with the title "Address Entry Form" -window = tk.Tk() -window.title("Address Entry Form") - -# Create a new frame `frm_form` to contain the Label -# and Entry widgets for entering address information -frm_form = tk.Frame(relief=tk.SUNKEN, borderwidth=3) -# Pack the frame into the window -frm_form.pack() - -# List of field labels -labels = [ - "First Name:", - "Last Name:", - "Address Line 1:", - "Address Line 2:", - "City:", - "State/Province:", - "Postal Code:", - "Country:", -] - -# Loop over the list of field labels -for idx, text in enumerate(labels): - # Create a Label widget with the text from the labels list - label = tk.Label(master=frm_form, text=text) - # Create an Entry widget - entry = tk.Entry(master=frm_form, width=50) - # Use the grid geometry manager to place the Label and - # Entry widgets in the row whose index is idx - label.grid(row=idx, column=0, sticky="e") - entry.grid(row=idx, column=1) - -# Create a new frame `frm_buttons` to contain the -# Submit and Clear buttons. This frame fills the -# whole window in the horizontal direction and has -# 5 pixels of horizontal and vertical padding. -frm_buttons = tk.Frame() -frm_buttons.pack(fill=tk.X, ipadx=5, ipady=5) - -# Create an event handler -def handle_keypress(event): - """Print the character associated to the key pressed""" - print(event.char) - -# Bind keypress event to handle_keypress() -window.bind("", handle_keypress) - -def handle_click(event): - print("Adress was submitted") - -# Create the "Submit" button and pack it to the -# right side of `frm_buttons` -btn_submit = tk.Button(master=frm_buttons, text="Submit") -btn_submit.pack(side=tk.RIGHT, padx=10, ipadx=10) -btn_submit.bind("", handle_click) - -# Create the "Clear" button and pack it to the -# right side of `frm_buttons` -btn_clear = tk.Button(master=frm_buttons, text="Clear") -btn_clear.pack(side=tk.RIGHT, ipadx=10) - -# Start the application -window.mainloop() \ No newline at end of file diff --git a/demo/app/basic.py b/demo/app/basic.py deleted file mode 100755 index 799a723..0000000 --- a/demo/app/basic.py +++ /dev/null @@ -1,47 +0,0 @@ -import tkinter as tk - -window = tk.Tk() -label = tk.Label( - text="Python rocks!", - foreground="white", # Set the text color to white - background="black" # Set the background color to black -) - -border_effects = { - "flat": tk.FLAT, - "sunken": tk.SUNKEN, - "raised": tk.RAISED, - "groove": tk.GROOVE, - "ridge": tk.RIDGE, -} -for relief_name, relief in border_effects.items(): - frame = tk.Frame(master=window, relief=relief, borderwidth=5) - frame.pack(side=tk.LEFT) - label = tk.Label(master=frame, text=relief_name) - label.pack() - -label.pack() -entry = tk.Entry() -entry.pack() - -name = entry.get() - -frame_a = tk.Frame() - - -label_a = tk.Label(master=frame_a, text="Personalliste") -label_a.pack() - -frame_a.pack() - -text_box = tk.Text() -text_box.pack() - -frame_b = tk.Frame() -label_b = tk.Label(master=frame_b, text="I'm in Frame B") -label_b.pack() -frame_b.pack() - - -window.mainloop() -print(name) \ No newline at end of file diff --git a/demo/app/config.py b/demo/app/config.py deleted file mode 100755 index 8bc7a07..0000000 --- a/demo/app/config.py +++ /dev/null @@ -1,5 +0,0 @@ -username = 'smx' -password = 'smx' - -#username = 'mqadmin' -#password = '3Mnj29jKBsFybc' \ No newline at end of file diff --git a/demo/app/dice.py b/demo/app/dice.py deleted file mode 100755 index 3a67e1c..0000000 --- a/demo/app/dice.py +++ /dev/null @@ -1,17 +0,0 @@ -import random -import tkinter as tk - -def roll(): - lbl_result["text"] = str(random.randint(1, 6)) - -window = tk.Tk() -window.columnconfigure(0, minsize=150) -window.rowconfigure([0, 1], minsize=50) - -btn_roll = tk.Button(text="Roll", command=roll) -lbl_result = tk.Label() - -btn_roll.grid(row=0, column=0, sticky="nsew") -lbl_result.grid(row=1, column=0) - -window.mainloop() \ No newline at end of file diff --git a/demo/app/edit.py b/demo/app/edit.py deleted file mode 100755 index 6fc73ef..0000000 --- a/demo/app/edit.py +++ /dev/null @@ -1,94 +0,0 @@ -import tkinter as tk -import config as conf -import pika - -from tkinter.filedialog import askopenfilename, asksaveasfilename - -def send_queue_message(): - exchange_name = 'simple-editor' - message_all = 'Sent from RabbitMQ' - - print(message_all) - credentials= pika.PlainCredentials(username= conf.username, password= conf.password) - connection= pika.BlockingConnection(pika.ConnectionParameters(host='localhost', port=5672, credentials= credentials)) - channel= connection.channel() - channel.exchange_declare(exchange = exchange_name, durable = True, exchange_type = 'topic') - channel.queue_declare(queue = 'AllInfo') - txt = txt_edit.get("1.0", tk.END) - channel.queue_bind(exchange = exchange_name, queue = 'AllInfo', routing_key = 'new') - channel.basic_publish(exchange = exchange_name, routing_key = 'new', body = txt) - channel.close() - -def get_queue_message(): - exchange_name = 'simple-editor' - credentials= pika.PlainCredentials(username= conf.username, password= conf.password) - connection = pika.BlockingConnection(pika.ConnectionParameters(host='localhost', port=5672, credentials= credentials)) - channel = connection.channel() - channel.exchange_declare(exchange_name, durable=True, exchange_type='topic') - txt_edit.delete("1.0", tk.END) - - def callback(ch,method,properties,body): - message = 'Message from Queue Part: ' + body.decode("utf-8") - txt_edit.insert(tk.END, message) - ch.basic_publish('exchange_not_exist', routing_key='new',cbody='Nope this is wrong') - ##ch.basic_ack(delivery_tag = method.delivery_tag + 1) - # Display the message parts - channel.queue_bind(exchange = exchange_name, queue = 'AllInfo', routing_key = 'new') - channel.basic_consume(queue='AllInfo', on_message_callback=callback, auto_ack=True) - ##channel.consume(queue = 'AllInfo') - - # Close the channel and the connection - channel.close() - connection.close() - message_all = 'Retrieved from RabbitMQ' - print(message_all) - -def open_file(): - """Open a file for editing.""" - filepath = askopenfilename( - filetypes=[("Text Files", "*.txt"), ("All Files", "*.*")] - ) - if not filepath: - return - txt_edit.delete("1.0", tk.END) - with open(filepath, mode="r", encoding="utf-8") as input_file: - text = input_file.read() - txt_edit.insert(tk.END, text) - window.title(f"Simple Text Editor - {filepath}") - -def save_file(): - """Save the current file as a new file.""" - filepath = asksaveasfilename( - defaultextension=".txt", - filetypes=[("Text Files", "*.txt"), ("All Files", "*.*")], - ) - if not filepath: - return - with open(filepath, mode="w", encoding="utf-8") as output_file: - text = txt_edit.get("1.0", tk.END) - output_file.write(text) - window.title(f"Simple Text Editor - {filepath}") - -window = tk.Tk() -window.title("Simple Text Editor") - -window.rowconfigure(0, minsize=800, weight=1) -window.columnconfigure(1, minsize=800, weight=1) - - -txt_edit = tk.Text(window) -frm_buttons = tk.Frame(window, relief=tk.RAISED, bd=2) -btn_open = tk.Button(frm_buttons, text="Open", command=open_file) -btn_save = tk.Button(frm_buttons, text="Save As...", command=save_file) -btn_send = tk.Button(frm_buttons, text="Send", command=send_queue_message) -btn_receive = tk.Button(frm_buttons, text="Receive", command=get_queue_message) - -btn_open.grid(row=0, column=0, sticky="ew", padx=5, pady=5) -btn_save.grid(row=1, column=0, sticky="ew", padx=5) -btn_send.grid(row=2, column=0, sticky="ew", padx=5, pady=5) -btn_receive.grid(row=3, column=0, sticky="ew", padx=5, pady=5) - -frm_buttons.grid(row=0, column=0, sticky="ns") -txt_edit.grid(row=0, column=1, sticky="nsew") - -window.mainloop() diff --git a/demo/app/queue/__pycache__/config.cpython-311.pyc b/demo/app/queue/__pycache__/config.cpython-311.pyc deleted file mode 100755 index c0baa2becefefdcd1a8a3cc94b1260bfe53b3e73..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 212 zcmZ3^%ge<81a*-|Q$vCDV-N=h7@>^Md_cx@h7^V<5N1qa3}(<|y2V_aTj2+!IZBID zi}Dh4Q*Ut;Bo-H!=NF}{WcUoy`pZ>66ew4$pPgS)nOv2fs9%&?kYAixl3$dWiX@s? zP*AL&l9ia3p05vN>lc=$mZs__=jWwmrt1|{{^GF7%}*)KNwq8D0GbMNRk1LT_`uA_ U$asTWpn(HSG;lO<6tMxt0V%#aZ~y=R diff --git a/demo/app/queue/ampq_client.py b/demo/app/queue/ampq_client.py deleted file mode 100755 index 3d6258a..0000000 --- a/demo/app/queue/ampq_client.py +++ /dev/null @@ -1,45 +0,0 @@ -import optparse -from proton import Message -from proton.handlers import MessagingHandler -from proton.reactor import Container - - -class Client(MessagingHandler): - def __init__(self, url, requests): - super(Client, self).__init__() - self.url = url - self.requests = requests - - def on_start(self, event): - self.sender = event.container.create_sender(self.url) - self.receiver = event.container.create_receiver(self.sender.connection, None, dynamic=True) - - def next_request(self): - if self.receiver.remote_source.address: - req = Message(reply_to=self.receiver.remote_source.address, body=self.requests[0]) - self.sender.send(req) - - def on_link_opened(self, event): - if event.receiver == self.receiver: - self.next_request() - - def on_message(self, event): - print("%s => %s" % (self.requests.pop(0), event.message.body)) - if self.requests: - self.next_request() - else: - event.connection.close() - - -REQUESTS = ["Twas brillig, and the slithy toves", - "Did gire and gymble in the wabe.", - "All mimsy were the borogroves,", - "And the mome raths outgrabe."] - -parser = optparse.OptionParser(usage="usage: %prog [options]", - description="Send requests to the supplied address and print responses.") -parser.add_option("-a", "--address", default="localhost:5672/examples", - help="address to which messages are sent (default %default)") -opts, args = parser.parse_args() - -Container(Client(opts.address, args or REQUESTS)).run() \ No newline at end of file diff --git a/demo/app/queue/ampq_receiver.py b/demo/app/queue/ampq_receiver.py deleted file mode 100755 index f8fe8a9..0000000 --- a/demo/app/queue/ampq_receiver.py +++ /dev/null @@ -1,29 +0,0 @@ -import optparse -import time -import os -import sys -from proton import Message -from proton.utils import BlockingConnection -from proton.handlers import IncomingMessageHandler - -broker = '5672' ##os.getenv('AMQP_BROKER_HOST_PORT') -queue = 'proton' ##os.getenv('AMQP_ADDRESS') -user_arg = 'smx' ##os.getenv('AMQP_USER') -userpw_arg = 'smx' ##os.getenv('AMQP_USER_PASSWORD') - -conn = BlockingConnection(broker, user=user_arg, password=userpw_arg) -receiver = conn.create_receiver(queue) - -count = 0 -try: - while True: - msg = receiver.receive(timeout=None) - count += 1 - print("got message, processing for two seconds...") - sys.stdout.flush() - time.sleep(2) - receiver.accept() -finally: - conn.close() - -print ("All done. Processed ", count, " messages.") \ No newline at end of file diff --git a/demo/app/queue/ampq_sender.py b/demo/app/queue/ampq_sender.py deleted file mode 100755 index ef7984c..0000000 --- a/demo/app/queue/ampq_sender.py +++ /dev/null @@ -1,52 +0,0 @@ -from __future__ import print_function, unicode_literals -import optparse -from proton import Message -from proton.handlers import MessagingHandler -from proton.reactor import Container -from proton.utils import BlockingConnection -from django.conf import settings - -broker = '5672' ##os.getenv('AMQP_BROKER_HOST_PORT') -queue = 'proton' ##os.getenv('AMQP_ADDRESS') -user_arg = 'smx' ##os.getenv('AMQP_USER') -userpw_arg = 'smx' ##os.getenv('AMQP_USER_PASSWORD') - -class Send(MessagingHandler): - def __init__(self, url, messages): - super(Send, self).__init__() - self.url = url - self.sent = 0 - self.confirmed = 0 - self.total = messages - - def on_start(self, event): - event.container.create_sender(self.url) - - def on_sendable(self, event): - while event.sender.credit and self.sent < self.total: - msg = Message(id=(self.sent+1), body={'sequence':(self.sent+1)}) - event.sender.send(msg) - self.sent += 1 - - def on_accepted(self, event): - self.confirmed += 1 - if self.confirmed == self.total: - print("all messages confirmed") - event.connection.close() - - def on_disconnected(self, event): - self.sent = self.confirmed - -conn = BlockingConnection(broker, user=user_arg, password=userpw_arg) - -parser = optparse.OptionParser(usage="usage: %prog [options]", - description="Send messages to the supplied address.") -parser.add_option("-a", "--address", default="0.0.0.0:16161/examples", - help="address to which messages are sent (default %default)") -parser.add_option("-m", "--messages", type="int", default=100, - help="number of messages to send (default %default)") -opts, args = parser.parse_args() - -try: - Container(Send(opts.address, opts.messages)).run() -except KeyboardInterrupt: pass \ No newline at end of file diff --git a/demo/app/queue/ampq_server.py b/demo/app/queue/ampq_server.py deleted file mode 100755 index c4534f9..0000000 --- a/demo/app/queue/ampq_server.py +++ /dev/null @@ -1,51 +0,0 @@ -import optparse -import sys -from proton import Condition, Message, Url -from proton.handlers import MessagingHandler -from proton.reactor import Container - -exit_status = 0 - - -class Server(MessagingHandler): - def __init__(self, url, address): - super(Server, self).__init__() - self.url = url - self.address = address - - def on_start(self, event): - print("Listening on", self.url) - self.container = event.container - self.conn = event.container.connect(self.url, desired_capabilities="ANONYMOUS-RELAY") - - def on_connection_opened(self, event): - if event.connection.remote_offered_capabilities and 'ANONYMOUS-RELAY' in event.connection.remote_offered_capabilities: - self.receiver = event.container.create_receiver(self.conn, self.address) - self.server = self.container.create_sender(self.conn, None) - else: - global exit_status - print("Server needs a broker which supports ANONYMOUS-RELAY", file=sys.stderr) - exit_status = 1 - c = event.connection - c.condition = Condition('amqp:not-implemented', description="ANONYMOUS-RELAY required") - c.close() - - def on_message(self, event): - print("Received", event.message) - self.server.send(Message(address=event.message.reply_to, body=event.message.body.upper(), - correlation_id=event.message.correlation_id)) - - -parser = optparse.OptionParser(usage="usage: %prog [options]") -parser.add_option("-a", "--address", default="localhost:5672/examples", - help="address from which messages are received (default %default)") -opts, args = parser.parse_args() - -url = Url(opts.address) - -try: - Container(Server(url, url.path)).run() -except KeyboardInterrupt: - pass - -sys.exit(exit_status) \ No newline at end of file diff --git a/demo/app/queue/client_http.py b/demo/app/queue/client_http.py deleted file mode 100755 index 6ca4b4c..0000000 --- a/demo/app/queue/client_http.py +++ /dev/null @@ -1,96 +0,0 @@ -import tornado.ioloop -import tornado.web -from tornado.gen import coroutine -from tornado.concurrent import Future -from proton import Message -from proton.handlers import MessagingHandler -from proton_tornado import Container - - -class Client(MessagingHandler): - def __init__(self, host, address): - super(Client, self).__init__() - self.host = host - self.address = address - self.sent = [] - self.pending = [] - self.reply_address = None - self.sender = None - self.receiver = None - - def on_start(self, event): - conn = event.container.connect(self.host) - self.sender = event.container.create_sender(conn, self.address) - self.receiver = event.container.create_receiver(conn, None, dynamic=True) - - def on_link_opened(self, event): - if event.receiver == self.receiver: - self.reply_address = event.link.remote_source.address - self.do_request() - - def on_sendable(self, event): - self.do_request() - - def on_message(self, event): - if self.sent: - request, future = self.sent.pop(0) - print("%s => %s" % (request, event.message.body)) - future.set_result(event.message.body) - self.do_request() - - def do_request(self): - if self.pending and self.reply_address and self.sender.credit: - request, future = self.pending.pop(0) - self.sent.append((request, future)) - req = Message(reply_to=self.reply_address, body=request) - self.sender.send(req) - - def request(self, body): - future = Future() - self.pending.append((body, future)) - self.do_request() - self.container.touch() - return future - - -class ExampleHandler(tornado.web.RequestHandler): - def initialize(self, client): - self.client = client - - def get(self): - self._write_open() - self._write_form() - self._write_close() - - @coroutine - def post(self): - response = yield self.client.request(self.get_body_argument("message")) - self.set_header("Content-Type", "text/html") - self._write_open() - self._write_form() - self.write("Response: " + response) - self._write_close() - - def _write_open(self): - self.write('') - - def _write_close(self): - self.write('') - - def _write_form(self): - self.write('
' - 'Request: ' - '' - '
') - - -loop = tornado.ioloop.IOLoop.instance() -client = Client("localhost:5672", "examples") -client.container = Container(client, loop=loop) -client.container.initialise() -app = tornado.web.Application([tornado.web.url(r"/client", ExampleHandler, dict(client=client))]) -app.listen(8888) -try: - loop.start() -except KeyboardInterrupt: - loop.stop() \ No newline at end of file diff --git a/demo/app/queue/config.py b/demo/app/queue/config.py deleted file mode 100755 index 8bc7a07..0000000 --- a/demo/app/queue/config.py +++ /dev/null @@ -1,5 +0,0 @@ -username = 'smx' -password = 'smx' - -#username = 'mqadmin' -#password = '3Mnj29jKBsFybc' \ No newline at end of file diff --git a/demo/app/queue/connect.json b/demo/app/queue/connect.json deleted file mode 100755 index e69de29..0000000 diff --git a/demo/app/queue/db_receive.py b/demo/app/queue/db_receive.py deleted file mode 100755 index 88d44fc..0000000 --- a/demo/app/queue/db_receive.py +++ /dev/null @@ -1,79 +0,0 @@ -#!/usr/bin/env python3 -# -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you 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. -# - -import optparse -from proton.handlers import MessagingHandler -from proton.reactor import ApplicationEvent, Container, EventInjector -from db_common import Db - - -class Recv(MessagingHandler): - def __init__(self, url, count): - super(Recv, self).__init__(auto_accept=False) - self.url = url - self.delay = 0 - self.last_id = None - self.expected = count - self.received = 0 - self.accepted = 0 - self.db = Db("dst_db", EventInjector()) - - def on_start(self, event): - event.container.selectable(self.db.injector) - e = ApplicationEvent("id_loaded") - e.container = event.container - self.db.get_id(e) - - def on_id_loaded(self, event): - self.last_id = event.id - event.container.create_receiver(self.url) - - def on_record_inserted(self, event): - self.accept(event.delivery) - self.accepted += 1 - if self.accepted == self.expected: - event.connection.close() - self.db.close() - - def on_message(self, event): - id = int(event.message.id) - if (not self.last_id) or id > self.last_id: - if self.expected == 0 or self.received < self.expected: - self.received += 1 - self.last_id = id - self.db.insert(id, event.message.body, ApplicationEvent("record_inserted", delivery=event.delivery)) - print("inserted message %s" % id) - else: - self.release(event.delivery) - else: - self.accept(event.delivery) - - -parser = optparse.OptionParser(usage="usage: %prog [options]") -parser.add_option("-a", "--address", default="localhost:5672/examples", - help="address from which messages are received (default %default)") -parser.add_option("-m", "--messages", type="int", default=0, - help="number of messages to receive; 0 receives indefinitely (default %default)") -opts, args = parser.parse_args() - -try: - Container(Recv(opts.address, opts.messages)).run() -except KeyboardInterrupt: - pass \ No newline at end of file diff --git a/demo/app/queue/db_send.py b/demo/app/queue/db_send.py deleted file mode 100755 index 71e97c5..0000000 --- a/demo/app/queue/db_send.py +++ /dev/null @@ -1,110 +0,0 @@ -#!/usr/bin/env python3 -# -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you 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. -# - -import optparse -import queue - - -from proton import Message -from proton.handlers import MessagingHandler -from proton.reactor import ApplicationEvent, Container, EventInjector -from db_common import Db - - -class Send(MessagingHandler): - def __init__(self, url, count): - super(Send, self).__init__() - self.url = url - self.delay = 0 - self.sent = 0 - self.confirmed = 0 - self.load_count = 0 - self.records = queue.Queue(maxsize=50) - self.target = count - self.db = Db("src_db", EventInjector()) - - def keep_sending(self): - return self.target == 0 or self.sent < self.target - - def on_start(self, event): - self.container = event.container - self.container.selectable(self.db.injector) - self.sender = self.container.create_sender(self.url) - - def on_records_loaded(self, event): - if self.records.empty(): - if event.subject == self.load_count: - print("Exhausted available data, waiting to recheck...") - # check for new data after 5 seconds - self.container.schedule(5, self) - else: - self.send() - - def request_records(self): - if not self.records.full(): - print("loading records...") - self.load_count += 1 - self.db.load(self.records, event=ApplicationEvent( - "records_loaded", link=self.sender, subject=self.load_count)) - - def on_sendable(self, event): - self.send() - - def send(self): - while self.sender.credit and not self.records.empty(): - if not self.keep_sending(): - return - record = self.records.get(False) - id = record['id'] - self.sender.send(Message(id=id, durable=True, body=record['description']), tag=str(id)) - self.sent += 1 - print("sent message %s" % id) - self.request_records() - - def on_settled(self, event): - id = int(event.delivery.tag) - self.db.delete(id) - print("settled message %s" % id) - self.confirmed += 1 - if self.confirmed == self.target: - event.connection.close() - self.db.close() - - def on_disconnected(self, event): - self.db.reset() - self.sent = self.confirmed - - def on_timer_task(self, event): - print("Rechecking for data...") - self.request_records() - - -parser = optparse.OptionParser(usage="usage: %prog [options]", - description="Send messages to the supplied address.") -parser.add_option("-a", "--address", default="localhost:5672/examples", - help="address to which messages are sent (default %default)") -parser.add_option("-m", "--messages", type="int", default=0, - help="number of messages to send; 0 sends indefinitely (default %default)") -opts, args = parser.parse_args() - -try: - Container(Send(opts.address, opts.messages)).run() -except KeyboardInterrupt: - pass \ No newline at end of file diff --git a/demo/app/queue/send.py b/demo/app/queue/send.py deleted file mode 100755 index ecef4d7..0000000 --- a/demo/app/queue/send.py +++ /dev/null @@ -1,6 +0,0 @@ -import stomp - -conn = stomp.Connection() -conn.connect('smx', 'smx', wait=True) -conn.send(content_type='application/raw',body=' Hello Stomp ', destination='/queue/test') -conn.disconnect() \ No newline at end of file diff --git a/demo/app/queue/test.py b/demo/app/queue/test.py deleted file mode 100755 index 2a7d68c..0000000 --- a/demo/app/queue/test.py +++ /dev/null @@ -1,39 +0,0 @@ -import stomp -from stomp.listener import TestListener -import testutils - - -##@pytest.fixture() -def conn(): - conn = stomp.Connection11(get_artemis_host()) - conn.set_listener("testlistener", TestListener("123", print_to_log=True)) - conn.connect(get_artemis_user(), get_artemis_password(), wait=True) - yield conn - conn.disconnect(receipt=None) - - -##@pytest.fixture() -def conn2(): - conn2 = stomp.Connection11(get_artemis_host()) - conn2.set_listener("testlistener", TestListener("456", print_to_log=True)) - conn2.connect(get_artemis_user(), get_artemis_password(), wait=True, headers={'consumerWindowSize': 0}) - yield conn2 - conn2.disconnect(receipt=None) - - -class TestArtemis(object): - - def test_send_to_artemis(self, conn): - conn.subscribe(destination="/queue/test", id=1, ack="auto") - - conn.send(body="this is a test", destination="/queue/test", receipt="123") - - validate_send(conn) - - def test_prefetchsize(self, conn2): - conn2.subscribe(destination="/queue/test2", id=2, ack="auto", headers={'consumerWindowSize': 0}) - - conn2.send(body="testing sending a message after subscribing with prefetch", - destination="/queue/test2", receipt="456") - - validate_send(conn2) \ No newline at end of file diff --git a/demo/app/temp.py b/demo/app/temp.py deleted file mode 100755 index bbe0e96..0000000 --- a/demo/app/temp.py +++ /dev/null @@ -1,41 +0,0 @@ -import tkinter as tk - -def fahrenheit_to_celsius(): - """Convert the value for Fahrenheit to Celsius and insert the - result into lbl_result. - """ - fahrenheit = ent_temperature.get() - celsius = (5 / 9) * (float(fahrenheit) - 32) - lbl_result["text"] = f"{round(celsius, 2)} \N{DEGREE CELSIUS}" - -# Set up the window -window = tk.Tk() -window.title("Temperature Converter") -window.resizable(width=False, height=False) - -# Create the Fahrenheit entry frame with an Entry -# widget and label in it -frm_entry = tk.Frame(master=window) -ent_temperature = tk.Entry(master=frm_entry, width=10) -lbl_temp = tk.Label(master=frm_entry, text="\N{DEGREE FAHRENHEIT}") - -# Layout the temperature Entry and Label in frm_entry -# using the .grid() geometry manager -ent_temperature.grid(row=0, column=0, sticky="e") -lbl_temp.grid(row=0, column=1, sticky="w") - -# Create the conversion Button and result display Label -btn_convert = tk.Button( - master=window, - text="\N{RIGHTWARDS BLACK ARROW}", - command=fahrenheit_to_celsius -) -lbl_result = tk.Label(master=window, text="\N{DEGREE CELSIUS}") - -# Set up the layout using the .grid() geometry manager -frm_entry.grid(row=0, column=0, padx=10) -btn_convert.grid(row=0, column=1, pady=10) -lbl_result.grid(row=0, column=2, padx=10) - -# Run the application -window.mainloop() \ No newline at end of file diff --git a/demo/db.sqlite3 b/demo/db.sqlite3 deleted file mode 100755 index fdad6d05014f7eff6ec6b220559307f9d792068e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 143360 zcmeI5Yit|Yb;mh;ik8TcA2Qbutwyx9Yep++9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DQ_H_p5Df;r^{JmITWnG5Mh-D9rOTxa7fwXL_Zc2dzinGk7S9)gub64QLe{Ly9>BEx)wTvRe@ zQ7%E-7v)4elaq2%hBkZ`M}l(NuTOh8f#I^IA(?R(pkCdpbB9i$~Rr61N+i)~jXx#<6pG z3+%QTsd{T_Fw#7C+82^x@xygfkY;W$a$U^oes-2$mrCKeN^Dy~c+9fM&z1Hn! z2`7Hn%Jd5^enmvJb{`m2#J_VAj#t_IaH^@Af3TBkP@d zDU0qHx~JL*>|pfntGpTI{SBoIgIgG;wN^CmymH#GrOT!xIRF1P;u&a)1dsp{Kmter z2_OL^fCP{L5m;JVb{Tcfc_DAgZ+3&&*zK{SCKmter z2_OL^fCP{L5vX#qe-DoTAD`w#rAPn?AOR$R z1dsp{Kmter2_OL^fCRb{Ame-|9sfJ&_}@v#|4usochd2{GXMp9*i{Gn1NL9oud<(K zUuQqeHXs3CNB{{S0VIF~kN^@u0!RP}AOR$R1dzbq1Wxq09YZ7S-xDzZAj2^qWSwef z=|6&Z)a!N(p3;9st*-w+<#9Vk&geg9(%7o1b<_Jkx7#r=Kz_N1{3J`j1$!Z~M}HaY zh!b{)$*%FcMTZ%;BQ!{Vpap)SOD#8QTV(w24gA=_eu}*jd@J~g;APms7ZN}MNB{{S z0VIF~kN^@u0!RP}JOKojy?zHf%q%fXN|LxSZd$3|RX3gQe_$UKPDMp%|DV9h^d9wcB(f^oK1!W=uB!C2v01`j~NB{{S0VIF~kN^@u0tX^M@Be4-I@teY zzsCL*`-kjrzz)8U01`j~NB{{S0VIF~kN^@u0!RP}Ac0*7Jmv8?hKG8L$0W2LSa96y za}0-idQ5rr{{534NFTDKx66dwkaxn8r#)67 Web API \ No newline at end of file diff --git a/demo/demo/asgi.py b/demo/demo/asgi.py deleted file mode 100755 index ac0c86a..0000000 --- a/demo/demo/asgi.py +++ /dev/null @@ -1,16 +0,0 @@ -""" -ASGI config for demo project. - -It exposes the ASGI callable as a module-level variable named ``application``. - -For more information on this file, see -https://docs.djangoproject.com/en/5.0/howto/deployment/asgi/ -""" - -import os - -from django.core.asgi import get_asgi_application - -os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'demo.settings') - -application = get_asgi_application() diff --git a/demo/demo/settings.py b/demo/demo/settings.py deleted file mode 100755 index 1c1ce73..0000000 --- a/demo/demo/settings.py +++ /dev/null @@ -1,124 +0,0 @@ -""" -Django settings for demo project. - -Generated by 'django-admin startproject' using Django 5.0.1. - -For more information on this file, see -https://docs.djangoproject.com/en/5.0/topics/settings/ - -For the full list of settings and their values, see -https://docs.djangoproject.com/en/5.0/ref/settings/ -""" - -from pathlib import Path - -# Build paths inside the project like this: BASE_DIR / 'subdir'. -BASE_DIR = Path(__file__).resolve().parent.parent - - -# Quick-start development settings - unsuitable for production -# See https://docs.djangoproject.com/en/5.0/howto/deployment/checklist/ - -# SECURITY WARNING: keep the secret key used in production secret! -SECRET_KEY = 'django-insecure-z$@7i%n)hn)=5-c8!%)y1-493jkohy8=s-xq8=iu(aud)xx0_+' - -# SECURITY WARNING: don't run with debug turned on in production! -DEBUG = True - -ALLOWED_HOSTS = [] - - -# Application definition - -INSTALLED_APPS = [ - 'django.contrib.admin', - 'django.contrib.auth', - 'django.contrib.contenttypes', - 'django.contrib.sessions', - 'django.contrib.messages', - 'django.contrib.staticfiles', - 'pyapp', -] - -MIDDLEWARE = [ - 'django.middleware.security.SecurityMiddleware', - 'django.contrib.sessions.middleware.SessionMiddleware', - 'django.middleware.common.CommonMiddleware', - 'django.middleware.csrf.CsrfViewMiddleware', - 'django.contrib.auth.middleware.AuthenticationMiddleware', - 'django.contrib.messages.middleware.MessageMiddleware', - 'django.middleware.clickjacking.XFrameOptionsMiddleware', -] - -ROOT_URLCONF = 'demo.urls' - -TEMPLATES = [ - { - 'BACKEND': 'django.template.backends.django.DjangoTemplates', - 'DIRS': [], - 'APP_DIRS': True, - 'OPTIONS': { - 'context_processors': [ - 'django.template.context_processors.debug', - 'django.template.context_processors.request', - 'django.contrib.auth.context_processors.auth', - 'django.contrib.messages.context_processors.messages', - ], - }, - }, -] - -WSGI_APPLICATION = 'demo.wsgi.application' - - -# Database -# https://docs.djangoproject.com/en/5.0/ref/settings/#databases - -DATABASES = { - 'default': { - 'ENGINE': 'django.db.backends.sqlite3', - 'NAME': BASE_DIR / 'db.sqlite3', - } -} - - -# Password validation -# https://docs.djangoproject.com/en/5.0/ref/settings/#auth-password-validators - -AUTH_PASSWORD_VALIDATORS = [ - { - 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator', - }, - { - 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator', - }, - { - 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator', - }, - { - 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator', - }, -] - - -# Internationalization -# https://docs.djangoproject.com/en/5.0/topics/i18n/ - -LANGUAGE_CODE = 'en-us' - -TIME_ZONE = 'UTC' - -USE_I18N = True - -USE_TZ = True - - -# Static files (CSS, JavaScript, Images) -# https://docs.djangoproject.com/en/5.0/howto/static-files/ - -STATIC_URL = 'static/' - -# Default primary key field type -# https://docs.djangoproject.com/en/5.0/ref/settings/#default-auto-field - -DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField' diff --git a/demo/demo/urls.py b/demo/demo/urls.py deleted file mode 100755 index 3b55f59..0000000 --- a/demo/demo/urls.py +++ /dev/null @@ -1,27 +0,0 @@ -""" -URL configuration for demo project. - -The `urlpatterns` list routes URLs to views. For more information please see: - https://docs.djangoproject.com/en/5.0/topics/http/urls/ -Examples: -Function views - 1. Add an import: from my_app import views - 2. Add a URL to urlpatterns: path('', views.home, name='home') -Class-based views - 1. Add an import: from other_app.views import Home - 2. Add a URL to urlpatterns: path('', Home.as_view(), name='home') -Including another URLconf - 1. Import the include() function: from django.urls import include, path - 2. Add a URL to urlpatterns: path('blog/', include('blog.urls')) -""" -from django.contrib import admin -from django.urls import path,include -from pyapp.views import pyapp_home -from pyapp.views import api_home - -urlpatterns = [ - path('admin/', admin.site.urls), - path('', include("pyapp.urls")), - path('pyapp/', pyapp_home), - path('api/', api_home), -] diff --git a/demo/demo/wsgi.py b/demo/demo/wsgi.py deleted file mode 100755 index 235cded..0000000 --- a/demo/demo/wsgi.py +++ /dev/null @@ -1,16 +0,0 @@ -""" -WSGI config for demo project. - -It exposes the WSGI callable as a module-level variable named ``application``. - -For more information on this file, see -https://docs.djangoproject.com/en/5.0/howto/deployment/wsgi/ -""" - -import os - -from django.core.wsgi import get_wsgi_application - -os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'demo.settings') - -application = get_wsgi_application() diff --git a/demo/manage.py b/demo/manage.py deleted file mode 100755 index d4cdb72..0000000 --- a/demo/manage.py +++ /dev/null @@ -1,22 +0,0 @@ -#!/usr/bin/env python -"""Django's command-line utility for administrative tasks.""" -import os -import sys - - -def main(): - """Run administrative tasks.""" - os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'demo.settings') - try: - from django.core.management import execute_from_command_line - except ImportError as exc: - raise ImportError( - "Couldn't import Django. Are you sure it's installed and " - "available on your PYTHONPATH environment variable? Did you " - "forget to activate a virtual environment?" - ) from exc - execute_from_command_line(sys.argv) - - -if __name__ == '__main__': - main() diff --git a/demo/migration/__init__.py b/demo/migration/__init__.py deleted file mode 100755 index e69de29..0000000 diff --git a/demo/migration/admin.py b/demo/migration/admin.py deleted file mode 100755 index edba562..0000000 --- a/demo/migration/admin.py +++ /dev/null @@ -1,5 +0,0 @@ -from django.contrib import admin -from pyapp.models import ShoppingItem - -# Register your models here. -admin.site.register(ShoppingItem) diff --git a/demo/migration/apps.py b/demo/migration/apps.py deleted file mode 100755 index 227ed08..0000000 --- a/demo/migration/apps.py +++ /dev/null @@ -1,6 +0,0 @@ -from django.apps import AppConfig - - -class PyappConfig(AppConfig): - default_auto_field = 'django.db.models.BigAutoField' - name = 'pyapp' diff --git a/demo/migration/migrations/0001_initial.py b/demo/migration/migrations/0001_initial.py deleted file mode 100755 index c2d1ca5..0000000 --- a/demo/migration/migrations/0001_initial.py +++ /dev/null @@ -1,33 +0,0 @@ -# Generated by Django 5.0.2 on 2024-02-23 10:59 - -import datetime -from django.db import migrations, models - - -class Migration(migrations.Migration): - - initial = True - - dependencies = [ - ] - - operations = [ - migrations.CreateModel( - name='Product', - fields=[ - ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('title', models.CharField(max_length=120)), - ('content', models.TextField(blank=True, null=True)), - ('price', models.DecimalField(decimal_places=2, default=99.99, max_digits=15)), - ], - ), - migrations.CreateModel( - name='ShoppingItem', - fields=[ - ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('created_at', models.DateField(default=datetime.date.today)), - ('name', models.CharField(max_length=120)), - ('done', models.BooleanField(default=False)), - ], - ), - ] diff --git a/demo/migration/migrations/0002_shoppingitem_price_shoppingitem_quantity.py b/demo/migration/migrations/0002_shoppingitem_price_shoppingitem_quantity.py deleted file mode 100755 index 72098de..0000000 --- a/demo/migration/migrations/0002_shoppingitem_price_shoppingitem_quantity.py +++ /dev/null @@ -1,24 +0,0 @@ -# Generated by Django 5.0.2 on 2024-02-26 20:29 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('migration', '0001_initial'), - ] - - operations = [ - migrations.AddField( - model_name='shoppingitem', - name='price', - field=models.DecimalField(decimal_places=2, default=0.0, max_digits=10), - ), - migrations.AddField( - model_name='shoppingitem', - name='quantity', - field=models.PositiveIntegerField(default=0.0), - preserve_default=False, - ), - ] diff --git a/demo/migration/migrations/__init__.py b/demo/migration/migrations/__init__.py deleted file mode 100755 index e69de29..0000000 diff --git a/demo/migration/migrations/__pycache__/0001_initial.cpython-311.pyc b/demo/migration/migrations/__pycache__/0001_initial.cpython-311.pyc deleted file mode 100755 index 15614912ab9d3c8113abee5ade1fc2d9ab3688e0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1670 zcmb7Ey>Ht_6hBg=zAV|4V@DR@R!dMsh7&nxhuRK`wi0ZlwSyE+fP#%n(7LlsnIct^ zGHg#CI&^Ec`VS~v6xQI;L#Iv|PXGturU0G1DR8=EY2T5O+`vZB-sz6NyL%tM_wJp3 z$!60CTIaAwo=6D&!570O55Q#=z)uJxELce6U(phpq9!(DT1-G9T17baJ;D+Z8(<@9 zCozOhVMI-nu&{wj@&#W$E{QDNH0!S6n~v?Vc+?1DSLv z6K00*fi0mkb|QiljHrQBCX^Z*?%*sQ#}ggp-N?7ay41o*xw3$4zq(u zwlO~R-AIckvD8H^hx2f^Gc2_}ywj&F@x*m-yXG^| z#4AjER4qv?W3+uouerqV31(w0*K8W@fxb%)Sjr==X;|hVVVOPRZaE&&ZKFw;?3=zt zF7|;`Nr0*`_H~Qcb$^E?YL4v_+lOM3w=BcnWs=>tEGC298oA&XRsZq#Kkq*O>+4T1 zcxp;9HjYURoLYLzGHS$Q2~4()w&h2Lu~|2L59~>y>-e@wEbOt&#*Wi!nRfk=Pns+} z;IA8gNpNStuB*btB<$GaacPnz^^m!)v$U>5Ww$K?IHT*|wGE3KhE>9}O&{WA8BAKl z#>B3f#B=#`VPlmrLF@cYxV&&#=5w?D8KiE7^I@sVj^PgAQ?ln~q}gMuaH+>SXg+V4`ROGI&k^R4W|SEZxx>2(Wt)~pFCRa zOTtwAXsw?_sp1dmAo+eTr@qQf)BN0vy&yk#F1@@%HJ#cn&3oOv7vw#v_`Tc=Rp*XB z2-LZ=8daCN>QbOCQDqsF>FoURN-#Tr_R%?}vz6{_C77*Hr5fto<2v`wzj`TC?KxF9 zyXt13Zc^pjeoCGi@5{+l`Za>-4WIgxSDcFffzx}mSU%nhiskd@H#eMy1pWpJV8QVK diff --git a/demo/migration/migrations/__pycache__/0002_shoppingitem_price_shoppingitem_quantity.cpython-311.pyc b/demo/migration/migrations/__pycache__/0002_shoppingitem_price_shoppingitem_quantity.cpython-311.pyc deleted file mode 100755 index 4ddef0fe633446a90ea3aefb99269503b3521df7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1101 zcmZuvzi-n(6u$GX#3rd)s}e}1AP_}(Xj2%g3JD1nfuJfxFl4bz?rNO+7iYJkh@k@m z3sSd=m7xfcp??B@LMmm5PHarwTs2cC-q~?VDQElhd++Xj_uhB+tzI_}j4#7qv?C$( zTR7!VN5;uA7<-5yf_)U=77nDAgpq_EAtHT5M5eeSmr46z{TO>KnJ7(UsYhbklDH9g zE^|^Z3KOmc5utw4E;GenA2}yq!Pr9-wJ<>~iC`DEWC>BFQx*kV6A{rml~E2N3Q>vH zt(-5RTRrbzV9|4y>X=3C8v7WUfUg+jQn$9RKm@*GxKc|eb!cpY>(9!Lpgn!u95g-r2+hh6I)wxp;Qy1e7Z|s_P#039r80bi&k2w=K*jfO5rB*d+YflmHWePsWTU zlx!Xq@MA)#U0qX`p-%&QLwSrHpEAr7xS zEUM2#e0nWPp#LrUI83QaSrIj&n2zqicXR?-==4M5B@~o2HllR9{eHt~FdB>0h`~l@ zQ74X*2I)AV8#M?GqQ+S6Gb?F;@b~P$^|o`l&xcBt7UFHDK?yksBl!%lGk!7+>9;dk zn$~unW(Lx)elq&inZf0`!PJ$3Ik$VeZ_XV&|0(y@Ui8f7q1o)4&8(v6#xVjI3iu~& zW?;^XwE2T}&s;h*m-^0z ztXP(>y$;rCb-6gj`|Jj|;xZ?%05Tb43|(QXhwfZ_GtI>P{wCAAY(d13PUi1CZpd*ZCdcJ;2YHq%MZf1H>Vo7Fx9)eY@ xA0MBYmst`YuUAm{i^C>2KczG$)vkyYXb;FG#r#0x12ZEd;|B&9QN#=s0{~uVGn4=T diff --git a/demo/migration/models.py b/demo/migration/models.py deleted file mode 100755 index 2a6da03..0000000 --- a/demo/migration/models.py +++ /dev/null @@ -1,18 +0,0 @@ -from django.db import models -from datetime import date - - -class ShoppingItem(models.Model): - created_at = models.DateField(default=date.today) - name = models.CharField(max_length=120) - done = models.BooleanField(default=False) - price = models.DecimalField(max_digits=10, decimal_places=2, default = 0.0) - quantity = models.PositiveIntegerField() - - def __str__(self): - return str(self.id) + ' - ' + self.name - -class Product(models.Model): - title = models.CharField(max_length=120) - content= models.TextField(blank=True, null=True) - price = models.DecimalField(max_digits=15,decimal_places=2,default=99.99) \ No newline at end of file diff --git a/demo/migration/serializers.py b/demo/migration/serializers.py deleted file mode 100755 index de95be6..0000000 --- a/demo/migration/serializers.py +++ /dev/null @@ -1,7 +0,0 @@ -from rest_framework import serializers -from .models import ShoppingItem - -class ShoppingItemSerializer(serializers.ModelSerializer): - class Meta: - model = ShoppingItem - fields = '__all__' \ No newline at end of file diff --git a/demo/migration/tests.py b/demo/migration/tests.py deleted file mode 100755 index 7ce503c..0000000 --- a/demo/migration/tests.py +++ /dev/null @@ -1,3 +0,0 @@ -from django.test import TestCase - -# Create your tests here. diff --git a/demo/migration/urls.py b/demo/migration/urls.py deleted file mode 100755 index b29de25..0000000 --- a/demo/migration/urls.py +++ /dev/null @@ -1,8 +0,0 @@ -from django.urls import path -from pyapp import views - -urlpatterns = [ -path("", views.index, name= "index"), -path("", views.pyapp_home, name= "pyapp"), -path("", views.api_home, name= "api"), -] \ No newline at end of file diff --git a/demo/migration/views.py b/demo/migration/views.py deleted file mode 100755 index a7f8204..0000000 --- a/demo/migration/views.py +++ /dev/null @@ -1,37 +0,0 @@ -from django.shortcuts import render -from django.http import HttpResponse, JsonResponse -from pyapp.models import ShoppingItem -from rest_framework import viewsets -from pyapp.serializers import ShoppingItemSerializer - -class ShoppingItemViewSet(viewsets.ModelViewSet): - queryset = ShoppingItem.objects.all() - serializer_class = ShoppingItemSerializer - -def index(response): - return HttpResponse("Welcome to PyApp") - -def pyapp_home(request): - if request.method == 'POST': - print('Received Data',request.POST['itemName']) - ShoppingItem.objects.create(name= request.POST['itemName']) - all_items = ShoppingItem.objects.all() - return render(request,'pyapp.html',{'all_items': all_items}) - -def api_home(request,endpoint, params={"message": "Your JSON Repsonse"}): - body = request.body - data = {} - try: - data = json.loads(body) - except: - pass - print(request.GET) - print(data) - data['params'] = dict(request.GET) - data['headers'] = dict(request.headers) - data['content_type'] = request.content_type - return JsonResponse(data) - - ##return JsonResponse() - - diff --git a/demo/queue/queue_consumer.py b/demo/queue/queue_consumer.py deleted file mode 100755 index dbd5f62..0000000 --- a/demo/queue/queue_consumer.py +++ /dev/null @@ -1,22 +0,0 @@ -import pika, time, config -#declaring the credentials needed for connection like host, port, username, password, exchange etc -credentials= pika.PlainCredentials(username= config.username, password= config.password) -connection = pika.BlockingConnection(pika.ConnectionParameters(host='localhost', port=5672, credentials= credentials)) -channel = connection.channel() -channel.exchange_declare('pydev', durable=True, exchange_type='topic') -#defining callback functions responding to corresponding queue callbacks -def callbackFunctionForQueueA(ch,method,properties,body): - print('Got a message from Queue A: ', body) -def callbackFunctionForQueueB(ch,method,properties,body): - print('Got a message from Queue B: ', body) -def callbackFunctionForQueueC(ch,method,properties,body): - print('Got a message from Queue C: ', body) -#Attaching consumer callback functions to respective queues that we wrote above -channel.basic_consume(queue='A', on_message_callback=callbackFunctionForQueueA, auto_ack=True) -channel.basic_consume(queue='B', on_message_callback=callbackFunctionForQueueB, auto_ack=True) -channel.basic_consume(queue='C', on_message_callback=callbackFunctionForQueueC, auto_ack=True) -#this will be command for starting the consumer session -channel.start_consuming() -##time.sleep(2) -##channel.stop_consuming() -channel.close() \ No newline at end of file diff --git a/demo/queue/queue_producer.py b/demo/queue/queue_producer.py deleted file mode 100755 index 0ead51c..0000000 --- a/demo/queue/queue_producer.py +++ /dev/null @@ -1,23 +0,0 @@ -import pika -##import amqp -import config -#declaring the credentials needed for connection like host, port, username, password, exchange etc -credentials= pika.PlainCredentials(username= config.username, password= config.password) -connection= pika.BlockingConnection(pika.ConnectionParameters(host='localhost', port=61616, credentials= credentials)) -channel = connection.channel() -channel.exchange_declare(exchange='pydev', durable=True, exchange_type='topic') -channel.queue_declare(queue= 'A') -channel.queue_bind(exchange='pydev', queue='A', routing_key='A') -channel.queue_declare(queue= 'B') -channel.queue_bind(exchange='pydev', queue='B', routing_key='B') -channel.queue_declare(queue= 'C') -channel.queue_bind(exchange='pydev', queue='C', routing_key='C') -#messaging to queue named C -message_spec= 'Only this channel can see this message' -message_all= 'Welcome to python queue handling...' -channel.basic_publish(exchange='pydev', routing_key='A', body= message_all) -channel.basic_publish(exchange='pydev', routing_key='B', body= message_all) -channel.basic_publish(exchange='pydev', routing_key='C', body= message_all) -channel.basic_publish(exchange='pydev', routing_key='B', body= message_spec) -channel.basic_publish(exchange='pydev', routing_key='C', body= message_spec) -channel.close() \ No newline at end of file diff --git a/demo/starter/demo_native_starter.sh b/demo/starter/demo_native_starter.sh deleted file mode 100755 index 597f8b5..0000000 --- a/demo/starter/demo_native_starter.sh +++ /dev/null @@ -1,3 +0,0 @@ -python3 manage.py runserver 9990 - -##python3 manage.py startapp banking-app \ No newline at end of file diff --git a/app/db.sqlite3 b/pyapp/db.sqlite3 similarity index 100% rename from app/db.sqlite3 rename to pyapp/db.sqlite3 diff --git a/app/manage.py b/pyapp/manage.py similarity index 100% rename from app/manage.py rename to pyapp/manage.py diff --git a/app/pyapp/__init__.py b/pyapp/pyapp/__init__.py similarity index 100% rename from app/pyapp/__init__.py rename to pyapp/pyapp/__init__.py diff --git a/app/pyapp/__pycache__/__init__.cpython-311.pyc b/pyapp/pyapp/__pycache__/__init__.cpython-311.pyc similarity index 100% rename from app/pyapp/__pycache__/__init__.cpython-311.pyc rename to pyapp/pyapp/__pycache__/__init__.cpython-311.pyc diff --git a/pyapp/pyapp/__pycache__/admin.cpython-311.pyc b/pyapp/pyapp/__pycache__/admin.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..8c3a6d7f15f20cd9012ee37087c5be7106f8aa28 GIT binary patch literal 396 zcmZ3^%ge<81WRVIq;&)7#~=<2Fhd!igMf_b3@HpLj5!Rsj8Tk?AU0DDQ!aB9Gb2MP zV-^cc%K}yy3z<%3UdG74uo{RV0H~iim_d`}C5WrZc#AbLB{wq<$lwXi$S)|!%uDwy zNzL`sWV^+el9ia3p0AgjpI1_pnN$RF(k+3+f&#sQN)VZwpOTtWTm-WJ7E5tvN$M?* zqSW-v;*!*&l?SJ}@&fGTvZNxPXdoFlb&tMIYE07};95 Zt}_TfiYNNhqt zffHcL9Wa%XCl%loS8le#vIWvfGKT@T` zq$a+^RZ4FX$1gGs#$6}zW9py)bu$G`=3ZbaOIvlUOTi;y4T5;wyB#=I#KS;%aS(a@ z$0)E%Bi0eEO8fcm4x%j#WlO~=x`j#znZxev_gri!WP1UB-GlKVPe1=jWsiLU_-%{0 literal 0 HcmV?d00001 diff --git a/pyapp/pyapp/__pycache__/models.cpython-311.pyc b/pyapp/pyapp/__pycache__/models.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..ecca32136b990b353a598bf2a69b33f5c5b8c234 GIT binary patch literal 1773 zcmaJ>&2Jk;6rbI-`}v;nEAdw;MZ2lQO&e+j;YTJM(7V z@9poYRFXhjKm3dRAQSQwjZTXmbqe zl9wpS%Q9igaS$xJ)YJK>DQ!s*5e6og+$N z3(fcon@R&|;wy(m_KT!k1@Pm4VTLtRfW08h?I>I!wfpiT5xc} zf#*}XuN}sn+_LS~3aiUTjNtP1nD#8dm7xcupcQ2}+zcnMFBjT|`}*8a0tDa0U*l8?H!vzG(1}@)}aK z&urUbMmZP)DcfZxw8=0r;aIf7%>om>ckmR<`|NhvWknXwA>t51*)`o7zX-GK5dH?d z`0EHL?f|eFoSy*d-K(7$T)*gN2Djg74tbf0R%XJ_Ow_+@tCt(sef9FDyvG@9|!w4tDZXAQb&Dt6b7}cjcH%Iy8Y2($Ekb|O$1!fnFlzLO05qw z(YLL5+DJGMwCZF0#weed_gC6LWoSik=0#xop0Ja+af(yX*k&d0{WL+e@KJA4Tv*!X|82cYf% literal 0 HcmV?d00001 diff --git a/app/pyapp/__pycache__/settings.cpython-311.pyc b/pyapp/pyapp/__pycache__/settings.cpython-311.pyc similarity index 100% rename from app/pyapp/__pycache__/settings.cpython-311.pyc rename to pyapp/pyapp/__pycache__/settings.cpython-311.pyc diff --git a/app/pyapp/__pycache__/urls.cpython-311.pyc b/pyapp/pyapp/__pycache__/urls.cpython-311.pyc similarity index 100% rename from app/pyapp/__pycache__/urls.cpython-311.pyc rename to pyapp/pyapp/__pycache__/urls.cpython-311.pyc diff --git a/app/pyapp/__pycache__/wsgi.cpython-311.pyc b/pyapp/pyapp/__pycache__/wsgi.cpython-311.pyc similarity index 100% rename from app/pyapp/__pycache__/wsgi.cpython-311.pyc rename to pyapp/pyapp/__pycache__/wsgi.cpython-311.pyc diff --git a/app/pyapp/admin.py b/pyapp/pyapp/admin.py similarity index 100% rename from app/pyapp/admin.py rename to pyapp/pyapp/admin.py diff --git a/app/pyapp/api-client.py b/pyapp/pyapp/api/__pycache__/api-client.py similarity index 100% rename from app/pyapp/api-client.py rename to pyapp/pyapp/api/__pycache__/api-client.py diff --git a/app/api/__pycache__/config.cpython-311.pyc b/pyapp/pyapp/api/__pycache__/config.cpython-311.pyc similarity index 100% rename from app/api/__pycache__/config.cpython-311.pyc rename to pyapp/pyapp/api/__pycache__/config.cpython-311.pyc diff --git a/app/pyapp/apps.py b/pyapp/pyapp/apps.py similarity index 100% rename from app/pyapp/apps.py rename to pyapp/pyapp/apps.py diff --git a/app/pyapp/asgi.py b/pyapp/pyapp/asgi.py similarity index 100% rename from app/pyapp/asgi.py rename to pyapp/pyapp/asgi.py diff --git a/app/pyapp/models.py b/pyapp/pyapp/models.py similarity index 100% rename from app/pyapp/models.py rename to pyapp/pyapp/models.py diff --git a/app/api/queue/__pycache__/config.cpython-311.pyc b/pyapp/pyapp/queue/__pycache__/config.cpython-311.pyc similarity index 100% rename from app/api/queue/__pycache__/config.cpython-311.pyc rename to pyapp/pyapp/queue/__pycache__/config.cpython-311.pyc diff --git a/app/api/queue/ampq_client.py b/pyapp/pyapp/queue/ampq_client.py similarity index 100% rename from app/api/queue/ampq_client.py rename to pyapp/pyapp/queue/ampq_client.py diff --git a/app/api/queue/ampq_receiver.py b/pyapp/pyapp/queue/ampq_receiver.py similarity index 100% rename from app/api/queue/ampq_receiver.py rename to pyapp/pyapp/queue/ampq_receiver.py diff --git a/app/api/queue/ampq_sender.py b/pyapp/pyapp/queue/ampq_sender.py similarity index 100% rename from app/api/queue/ampq_sender.py rename to pyapp/pyapp/queue/ampq_sender.py diff --git a/app/api/queue/ampq_server.py b/pyapp/pyapp/queue/ampq_server.py similarity index 100% rename from app/api/queue/ampq_server.py rename to pyapp/pyapp/queue/ampq_server.py diff --git a/app/api/queue/client_http.py b/pyapp/pyapp/queue/client_http.py similarity index 100% rename from app/api/queue/client_http.py rename to pyapp/pyapp/queue/client_http.py diff --git a/app/api/config.py b/pyapp/pyapp/queue/config.py similarity index 100% rename from app/api/config.py rename to pyapp/pyapp/queue/config.py diff --git a/app/api/queue/connect.json b/pyapp/pyapp/queue/connect.json similarity index 100% rename from app/api/queue/connect.json rename to pyapp/pyapp/queue/connect.json diff --git a/app/api/queue/db_receive.py b/pyapp/pyapp/queue/db_receive.py similarity index 100% rename from app/api/queue/db_receive.py rename to pyapp/pyapp/queue/db_receive.py diff --git a/app/api/queue/db_send.py b/pyapp/pyapp/queue/db_send.py similarity index 100% rename from app/api/queue/db_send.py rename to pyapp/pyapp/queue/db_send.py diff --git a/app/pyapp/queue/queue_consumer.py b/pyapp/pyapp/queue/queue_consumer.py similarity index 100% rename from app/pyapp/queue/queue_consumer.py rename to pyapp/pyapp/queue/queue_consumer.py diff --git a/app/pyapp/queue/queue_producer.py b/pyapp/pyapp/queue/queue_producer.py similarity index 100% rename from app/pyapp/queue/queue_producer.py rename to pyapp/pyapp/queue/queue_producer.py diff --git a/app/api/queue/send.py b/pyapp/pyapp/queue/send.py similarity index 100% rename from app/api/queue/send.py rename to pyapp/pyapp/queue/send.py diff --git a/app/api/queue/test.py b/pyapp/pyapp/queue/test.py similarity index 100% rename from app/api/queue/test.py rename to pyapp/pyapp/queue/test.py diff --git a/app/pyapp/serializers.py b/pyapp/pyapp/serializers.py similarity index 100% rename from app/pyapp/serializers.py rename to pyapp/pyapp/serializers.py diff --git a/app/pyapp/settings.py b/pyapp/pyapp/settings.py similarity index 100% rename from app/pyapp/settings.py rename to pyapp/pyapp/settings.py diff --git a/app/pyapp/templates/pyapp.html b/pyapp/pyapp/templates/pyapp.html similarity index 96% rename from app/pyapp/templates/pyapp.html rename to pyapp/pyapp/templates/pyapp.html index 6957b7f..22a0443 100755 --- a/app/pyapp/templates/pyapp.html +++ b/pyapp/pyapp/templates/pyapp.html @@ -1,6 +1,6 @@ - Pyapp + PyApp @@ -34,7 +34,7 @@
-

Shopping List

+

PyApp Apis

{% for item in all_items %}
diff --git a/app/pyapp/tests.py b/pyapp/pyapp/tests.py similarity index 100% rename from app/pyapp/tests.py rename to pyapp/pyapp/tests.py diff --git a/app/pyapp/urls.py b/pyapp/pyapp/urls.py similarity index 100% rename from app/pyapp/urls.py rename to pyapp/pyapp/urls.py diff --git a/app/pyapp/views.py b/pyapp/pyapp/views.py similarity index 100% rename from app/pyapp/views.py rename to pyapp/pyapp/views.py diff --git a/app/api/address.py b/pyapp/pyapp/window/address.py similarity index 100% rename from app/api/address.py rename to pyapp/pyapp/window/address.py diff --git a/app/api/basic.py b/pyapp/pyapp/window/basic.py similarity index 100% rename from app/api/basic.py rename to pyapp/pyapp/window/basic.py diff --git a/app/api/queue/config.py b/pyapp/pyapp/window/config.py similarity index 100% rename from app/api/queue/config.py rename to pyapp/pyapp/window/config.py diff --git a/app/api/dice.py b/pyapp/pyapp/window/dice.py similarity index 100% rename from app/api/dice.py rename to pyapp/pyapp/window/dice.py diff --git a/app/api/edit.py b/pyapp/pyapp/window/edit.py similarity index 100% rename from app/api/edit.py rename to pyapp/pyapp/window/edit.py diff --git a/app/api/temp.py b/pyapp/pyapp/window/temp.py similarity index 100% rename from app/api/temp.py rename to pyapp/pyapp/window/temp.py diff --git a/app/pyapp/wsgi.py b/pyapp/pyapp/wsgi.py similarity index 100% rename from app/pyapp/wsgi.py rename to pyapp/pyapp/wsgi.py diff --git a/demo/starter/build.sh b/pyapp/starter/build.sh similarity index 100% rename from demo/starter/build.sh rename to pyapp/starter/build.sh diff --git a/app/starter/demo_native_starter.sh b/pyapp/starter/demo_native_starter.sh similarity index 100% rename from app/starter/demo_native_starter.sh rename to pyapp/starter/demo_native_starter.sh