diff --git a/ChangeLog.txt b/ChangeLog.txt
new file mode 100644
index 000000000000..986b301bebb4
--- /dev/null
+++ b/ChangeLog.txt
@@ -0,0 +1,2 @@
+2012-??-?? Version 0.9.0
+ * Initial Release
\ No newline at end of file
diff --git a/LICENSE.txt b/LICENSE.txt
new file mode 100644
index 000000000000..2bb9ad240fa0
--- /dev/null
+++ b/LICENSE.txt
@@ -0,0 +1,176 @@
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
\ No newline at end of file
diff --git a/README b/README
deleted file mode 100644
index e69de29bb2d1..000000000000
diff --git a/README.md b/README.md
new file mode 100644
index 000000000000..88fd82ac926a
--- /dev/null
+++ b/README.md
@@ -0,0 +1,261 @@
+# Windows Azure SDK for Python
+
+This project provides a set of Python packages that make it easy to access
+the Windows Azure storage and queue services. For documentation on how
+to host Python applications on Windows Azure, please see the
+[Windows Azure](http://www.windowsazure.com/en-us/develop/python/)
+Python Developer Center.
+
+# Features
+
+* Tables
+ * create and delete tables
+ * create, query, insert, update, merge, and delete entities
+* Blobs
+ * create, list, and delete containers, work with container metadata and permissions, list blobs in container
+ * create block and page blobs (from a stream, a file, or a string), work with blob blocks and pages, delete blobs
+ * work with blob properties, metadata, leases, snapshot a blob
+* Storage Queues
+ * create, list, and delete queues, and work with queue metadata
+ * create, get, peek, update, delete messages
+* Service Bus
+ * Queues: create, list and delete queues; create, list, and delete subscriptions; send, receive, unlock and delete messages
+ * Topics: create, list, and delete topics; create, list, and delete rules
+
+# Getting Started
+## Download Source Code
+
+To get the source code of the SDK via **git** just type:
+
+ git clone https://github.com/WindowsAzure/azure-sdk-for-python.git
+ cd ./azure-sdk-for-python
+
+## Download Package
+
+Alternatively, to get the source code via the Python Package Index (PyPI), type
+
+ %SystemDrive%\Python27\Scripts\pip.exe install pyazure
+
+You can use these packages against the cloud Windows Azure Services, or against
+the local Storage Emulator (with the exception of Service Bus features).
+
+1. To use the cloud services, you need to first create an account with Windows Azure. To use the storage services, you need to set the AZURE_STORAGE_ACCOUNT and the AZURE_STORAGE_ACCESS_KEY environment variables to the storage account name and primary access key you obtain from the Azure Portal. To use Service Bus, you need to set the AZURE_SERVICEBUS_NAMESPACE and the AZURE_SERVICEBUS_ACCESS_KEY environment variables to the service bus namespace and the default key you obtain from the Azure Portal.
+2. To use the Storage Emulator, make sure the latest version of the Windows Azure SDK is installed on the machine, and set the EMULATED environment variable to any value ("true", "1", etc.)
+
+# Usage
+## Table Storage
+
+To ensure a table exists, call **createTableIfNotExists**:
+
+```Javascript
+var tableService = azure.createTableService();
+tableService.createTableIfNotExists('tasktable', function(error){
+ if(!error){
+ // Table exists
+ }
+});
+```
+A new entity can be added by calling **insertEntity**:
+
+```Javascript
+var tableService = azure.createTableService(),
+ task1 = {
+ PartitionKey : 'tasksSeattle',
+ RowKey: '1',
+ Description: 'Take out the trash',
+ DueDate: new Date(2011, 12, 14, 12)
+ };
+tableService.insertEntity('tasktable', task1, function(error){
+ if(!error){
+ // Entity inserted
+ }
+});
+```
+
+The method **queryEntity** can then be used to fetch the entity that was just inserted:
+
+```Javascript
+var tableService = azure.createTableService();
+tableService.queryEntity('tasktable', 'tasksSeattle', '1', function(error, serverEntity){
+ if(!error){
+ // Entity available in serverEntity variable
+ }
+});
+```
+
+## Blob Storage
+
+The **createContainerIfNotExists** method can be used to create a
+container in which to store a blob:
+
+```Javascript
+var blobService = azure.createBlobService();
+blobService.createContainerIfNotExists('taskcontainer', {publicAccessLevel : 'blob'}, function(error){
+ if(!error){
+ // Container exists and is public
+ }
+});
+```
+
+To upload a file (assuming it is called task1-upload.txt, it contains the exact text "hello world" (no quotation marks), and it is placed in the same folder as the script below), the method **createBlockBlobFromStream** can be used:
+
+```Javascript
+var blobService = azure.createBlobService();
+blobService.createBlockBlobFromStream('taskcontainer', 'task1', fs.createReadStream('task1-upload.txt'), 11, function(error){
+ if(!error){
+ // Blob uploaded
+ }
+});
+```
+
+To download the blob and write it to the file system, the **getBlobToStream** method can be used:
+
+```Javascript
+var blobService = azure.createBlobService();
+blobService.getBlobToStream('taskcontainer', 'task1', fs.createWriteStream('task1-download.txt'), function(error, serverBlob){
+ if(!error){
+ // Blob available in serverBlob.blob variable
+ }
+});
+```
+
+## Storage Queues
+
+The **createQueueIfNotExists** method can be used to ensure a queue exists:
+
+```Javascript
+var queueService = azure.createQueueService();
+queueService.createQueueIfNotExists('taskqueue', function(error){
+ if(!error){
+ // Queue exists
+ }
+});
+```
+
+The **createMessage** method can then be called to insert the message into the queue:
+
+```Javascript
+var queueService = azure.createQueueService();
+queueService.createMessage('taskqueue', "Hello world!", function(error){
+ if(!error){
+ // Message inserted
+ }
+});
+```
+
+It is then possible to call the **getMessage** method, process the message and then call **deleteMessage** inside the callback. This two-step process ensures messages don't get lost when they are removed from the queue.
+
+```Javascript
+var queueService = azure.createQueueService(),
+ queueName = 'taskqueue';
+queueService.getMessages(queueName, function(error, serverMessages){
+ if(!error){
+ // Process the message in less than 30 seconds, the message
+ // text is available in serverMessages[0].messagetext
+
+ queueService.deleteMessage(queueName, serverMessages[0].messageid, serverMessages[0].popreceipt, function(error){
+ if(!error){
+ // Message deleted
+ }
+ });
+ }
+});
+```
+
+## ServiceBus Queues
+
+ServiceBus Queues are an alternative to Storage Queues that might be useful in scenarios where more advanced messaging features are needed (larger message sizes, message ordering, single-operaiton destructive reads, scheduled delivery) using push-style delivery (using long polling).
+
+The **createQueueIfNotExists** method can be used to ensure a queue exists:
+
+```Javascript
+var serviceBusService = azure.createServiceBusService();
+serviceBusService.createQueueIfNotExists('taskqueue', function(error){
+ if(!error){
+ // Queue exists
+ }
+});
+```
+
+The **sendQueueMessage** method can then be called to insert the message into the queue:
+
+```Javascript
+var serviceBusService = azure.createServiceBusService();
+serviceBusService.sendQueueMessage('taskqueue', 'Hello world!', function(
+ if(!error){
+ // Message sent
+ }
+});
+```
+
+It is then possible to call the **receiveQueueMessage** method to dequeue the message.
+
+```Javascript
+var serviceBusService = azure.createServiceBusService();
+serviceBusService.receiveQueueMessage('taskqueue', function(error, serverMessage){
+ if(!error){
+ // Process the message
+ }
+});
+```
+
+## ServiceBus Topics
+
+ServiceBus topics are an abstraction on top of ServiceBus Queues that make pub/sub scenarios easy to implement.
+
+The **createTopicIfNotExists** method can be used to create a server-side topic:
+
+```Javascript
+var serviceBusService = azure.createServiceBusService();
+serviceBusService.createTopicIfNotExists('taskdiscussion', function(error){
+ if(!error){
+ // Topic exists
+ }
+});
+```
+
+The **sendTopicMessage** method can be used to send a message to a topic:
+
+```Javascript
+var serviceBusService = azure.createServiceBusService();
+serviceBusService.sendTopicMessage('taskdiscussion', 'Hello world!', function(error){
+ if(!error){
+ // Message sent
+ }
+});
+```
+
+A client can then create a subscription and start consuming messages by calling the **createSubscription** method followed by the **receiveSubscriptionMessage** method. Please note that any messages sent before the subscription is created will not be received.
+
+```Javascript
+var serviceBusService = azure.createServiceBusService(),
+ topic = 'taskdiscussion',
+ subscription = 'client1';
+
+serviceBusService.createSubscription(topic, subscription, function(error1){
+ if(!error1){
+ // Subscription created
+
+ serviceBusService.receiveSubscriptionMessage(topic, subscription, function(error2, serverMessage){
+ if(!error2){
+ // Process message
+ }
+ });
+ }
+});
+```
+
+** For more examples please see the [Windows Azure Python Developer Center](http://www.windowsazure.com/en-us/develop/python) **
+
+# Need Help?
+
+Be sure to check out the Windows Azure [Developer Forums on Stack Overflow](http://go.microsoft.com/fwlink/?LinkId=234489) if you have trouble with the provided code.
+
+# Contribute Code or Provide Feedback
+
+If you would like to become an active contributor to this project please follow the instructions provided in [Windows Azure Projects Contribution Guidelines](http://windowsazure.github.com/guidelines.html).
+
+If you encounter any bugs with the library please file an issue in the [Issues](https://github.com/WindowsAzure/azure-sdk-for-python/issues) section of the project.
+
+# Learn More
+[Windows Azure Python Developer Center](http://www.windowsazure.com/en-us/develop/python/)
diff --git a/examples/blobuploader/helpers.js b/examples/blobuploader/helpers.js
new file mode 100644
index 000000000000..f77aeeb386c6
--- /dev/null
+++ b/examples/blobuploader/helpers.js
@@ -0,0 +1,10 @@
+//Helper functions
+var exports = module.exports;
+
+exports.renderError = function(response, message) {
+ response.render("error.ejs", {
+ locals: {
+ title: message ? message : "Error"
+ }
+ });
+};
\ No newline at end of file
diff --git a/examples/blobuploader/package.json b/examples/blobuploader/package.json
new file mode 100644
index 000000000000..950ea8916560
--- /dev/null
+++ b/examples/blobuploader/package.json
@@ -0,0 +1,11 @@
+{
+ "name": "productmanager"
+ , "version": "0.0.1"
+ , "private": true
+ , "dependencies": {
+ "express": ">= 2.4.7"
+ , "ejs": ">= 0.4.3"
+ , "formidable": ">= 1.0.6"
+ , "azure": ">= 0.5.1"
+ }
+}
\ No newline at end of file
diff --git a/examples/blobuploader/public/Images/delete.png b/examples/blobuploader/public/Images/delete.png
new file mode 100644
index 000000000000..ba558aed879f
Binary files /dev/null and b/examples/blobuploader/public/Images/delete.png differ
diff --git a/examples/blobuploader/public/Images/download.png b/examples/blobuploader/public/Images/download.png
new file mode 100644
index 000000000000..f7eb98bd9ff9
Binary files /dev/null and b/examples/blobuploader/public/Images/download.png differ
diff --git a/examples/blobuploader/public/css/default.css b/examples/blobuploader/public/css/default.css
new file mode 100644
index 000000000000..a6f029bd9154
--- /dev/null
+++ b/examples/blobuploader/public/css/default.css
@@ -0,0 +1,496 @@
+/*#region -----------------------------Main Layout*/
+html {
+ height: 100%;
+ min-height: 700px;
+}
+
+a {
+ outline: none;
+}
+
+li {
+ margin: 5px 0 5px;
+}
+
+body {
+ background: #ebf0f2;
+ font-family: Actor, sans-serif;
+ font-size: 100%;
+ color: #434343;
+ height: 100%;
+ min-height: 900px;
+}
+
+.mainWrapper {
+ position: relative;
+ background-color: rgba(204, 204, 204, 0.75);
+ width: 850px;
+ margin: 0 auto;
+ min-height: 100%;
+}
+
+.mainLayout {
+ clear: both;
+ width: 850px;
+ padding-bottom: 25px;
+ height: 100%;
+}
+
+.mainSection {
+ position: relative;
+ margin: 50px 0 25px 90px;
+}
+
+header, footer {
+ font-weight: bold;
+ font-size: 0.9em;
+ color: #e6e2df;
+ background-color: rgba(0, 0, 0, 0.53);
+ text-transform: uppercase;
+}
+
+.login {
+ float: right;
+ padding-right: 12px;
+}
+
+.loginLink {
+ color: #e6e2df;
+}
+
+ .loginLink:hover {
+ color: #ebf0f2;
+ }
+
+.welcomeUser {
+ color: #92a5bc;
+ font-size: 0.9em;
+ margin-right: 12px;
+}
+
+.no-rgba header, .no-rgba footer {
+ background-color: #666666;
+}
+
+header {
+ height: 30px;
+ padding: 15px 0px 0px 10px;
+}
+
+ .mainTitle a {
+ color: #CCC;
+ }
+
+ .mainTitle a:hover {
+ color: #CCC;
+ }
+
+footer {
+ text-align: center;
+ position: absolute;
+ padding-top: 6px;
+ height: 25px;
+ width: 850px;
+ bottom: 0;
+}
+
+ footer a {
+ color: #e6e2df;
+ }
+
+ footer a:hover {
+ color: #ebf0f2;
+ }
+
+.splashTitle {
+ font-size: 4em;
+ position: absolute;
+ top: 25%;
+ left: 38%;
+}
+
+.pageTitle {
+ font-size: 3em;
+ margin-bottom: 20px;
+ margin-left: -29px;
+}
+
+.pageValidation{
+ margin-top: 25px;
+ margin-bottom: 10px;
+ display: none;
+}
+
+.mainMenu {
+ position: absolute;
+ left: 27%;
+ top: 34%;
+ list-style: none;
+ display: inline;
+}
+
+.mainMenu li {
+ float: left;
+}
+
+.mainMenu li a {
+ background-position: center;
+ display: block;
+ padding: 105px 15px 10px 15px;
+ text-align: center;
+ color: Black;
+ font-size: 1.1em;
+ width: 100px;
+}
+
+.createList {
+ background: url("Images/CreateList.png") no-repeat;
+}
+
+.claimItems {
+ background: url("Images/ClaimItems.png") no-repeat;
+}
+
+.getGifts{
+ background: url("Images/GetGifts.png") no-repeat;
+}
+
+.loginMenu {
+ position: absolute;
+ top: 33%;
+ left: 42%;
+ margin-bottom: 25px;
+}
+
+.loginMenu li {
+ float: left;
+ border-right: 2px solid;
+ padding: 0 12px 0 12px;
+}
+
+.loginMenu li:last-child {
+ border-right: none;
+}
+
+h1 {
+ font-size: 1.6em;
+}
+
+h2 {
+ font-size: 1.3em;
+}
+
+
+/*#endregion*/
+/*#region -----------------------------Primary Tags*/
+a {
+ color: #577fae;
+ text-decoration: none;
+}
+
+ a:hover {
+ color: #92a5bc;
+ }
+
+ a#home {
+ color: #91a1ab;
+ }
+/*#endregion*/
+/*#region -----------------------------Menu*/
+.nav {
+ float: left;
+ list-style: none;
+ margin-left: -10px;
+}
+
+ .nav li {
+ float: left;
+ margin-left: 18px;
+ padding: 0;
+ }
+
+ .nav li a {
+ color: #e6e2df;
+ }
+
+ .nav li a:hover {
+ color: #ebf0f2;
+ }
+/*#endregion*/
+/*#region -----------------------------Form Layout*/
+form {
+ margin-top: 20px;
+}
+
+fieldset {
+ border: none;
+ margin: 0;
+ padding: 0;
+}
+
+ fieldset legend {
+ display: none;
+ }
+
+ fieldset ol {
+ padding: 0;
+ list-style: none;
+ }
+
+ fieldset ol li {
+ padding-bottom: 5px;
+ }
+
+ fieldset label {
+ display: block;
+ font-size: 1.0em;
+ font-weight: 600;
+ }
+
+ fieldset label.checkbox {
+ display: inline;
+ }
+
+ fieldset input[type="text"],
+ fieldset input[type="password"],
+ fieldset select {
+ border: 1px solid #e2e2e2;
+ color: #333;
+ font-size: 1.0em;
+ margin: 5px 0 6px 0;
+ padding: 5px;
+ width: 300px;
+ }
+
+ fieldset input[type="text"]:focus,
+ fieldset input[type="password"]:focus {
+ border: 1px solid #7ac0da;
+ }
+
+ fieldset input[type="submit"], .submit {
+ background-color: #92a5bc;
+ border: solid 1px #787878;
+ cursor: pointer;
+ font-size: 1.2em;
+ font-weight: 600;
+ padding: 7px;
+ margin: 10px 0 15px;
+ }
+
+ fieldset select {
+
+ }
+/*#endregion*/
+/*#region -----------------------------Validation*/
+.message-info {
+ border: solid 1px;
+ clear: both;
+ padding: 20px 20px;
+ margin: 20px 0 15px;
+ width: 300px;
+}
+
+.validation-summary-valid {
+ display: none;
+}
+
+.validation-summary-errors {
+ clear: both;
+ display: block;
+ color: #e80c4d;
+ font-weight: bold;
+ padding: 20px 0 10px 0;
+}
+
+ .validation-summary-errors span {
+ font-size: 1.0em;
+ text-align: left;
+ }
+
+ .validation-summary-errors li {
+ font-size: 0.9em;
+ list-style: disc;
+ text-align: left;
+ margin: 2px 0 2px;
+ }
+
+.message-success {
+ color: #0ab317;
+ font-size: 1.0em;
+ font-weight: bold;
+ margin: 20px 0 10px 0;
+}
+
+.error {
+ color: #e80c4d;
+}
+
+.error-label {
+ color: #e80c4d;
+ font-weight: bold;
+}
+
+.error-label + input[type="text"],
+.error-label + input[type="password"] {
+ border: solid 1px #e80c4d;
+}
+
+.field-validation-error {
+ display: inline;
+ color: #e80c4d;
+ font-weight: bold;
+ font-size: 1.0em;
+}
+
+.field-validation-valid {
+ display: none;
+}
+/*#endregion*/
+/*#region -----------------------------Main Lists*/
+.listEntry, .itemEntry {
+ width: 650px;
+ height: 80px;
+ background-color: #92a5bc;
+ margin: 20px 0 20px 0;
+ padding: 10px;
+}
+.listTitle {
+ font-size: 1.3em;
+ color: #e6e2df;
+}
+ .listTitle:hover {
+ color: #e6e2df;
+ }
+.listDescription, .itemDescription {
+ margin: 7px 25px;
+}
+.listDefault {
+ color: #ebf0f2;
+ float: right;
+ font-size: 1.0em;
+}
+.itemTitle {
+ font-size: 1.3em;
+}
+.itemClaimed {
+ color: #ebf0f2;
+ font-size: 1.1em;
+ vertical-align: top;
+}
+.itemPriceTag {
+ border-top: 17px solid transparent;
+ border-bottom: 17px solid transparent;
+ border-right: 17px solid #eae071;
+ width: 0;
+ height: 0;
+ margin: -25px 35px;
+ float: right;
+}
+.itemPrice {
+ background-color: #eae071;
+ padding: 5px;
+ float: right;
+ width: 75px;
+ margin: -4px -35px;
+ font-size: 1.5em;
+ text-indent: -2px;
+ text-align: right;
+}
+.itemLink {
+ font-size: 1.0em;
+ color: #e6e2df;
+}
+ .itemLink:hover {
+ color: #e6e2df;
+ }
+.editList {
+ width: 48px;
+ height: 48px;
+ display: block;
+ float: right;
+ padding-right: 7px;
+ background: url("Images/edit.png") no-repeat;
+}
+.addListItem {
+ width: 48px;
+ height: 48px;
+ display: block;
+ float: right;
+ padding-right: 12px;
+ background: url("Images/add.png") no-repeat;
+}
+.downloadBlob {
+ display: block;
+ float: right;
+ width: 48px;
+ height: 48px;
+ background: url("/Images/download.png") no-repeat;
+}
+.deleteBlob {
+ display: block;
+ float: right;
+ width: 48px;
+ height: 48px;
+ background: url("/Images/delete.png") no-repeat;
+}
+.blobItem {
+ clear: both;
+ width: 650px;
+ padding: 15px 0 15px;
+}
+.claimItem {
+ width: 48px;
+ height: 48px;
+ display: block;
+ float: right;
+ padding-right: 7px;
+ background: url("Images/claim.png") no-repeat;
+}
+.createNewList {
+ height: 64px;
+ width: 64px;
+ background: url("Images/CreateList.png") no-repeat;
+ display: block;
+ margin-left: 293px;
+ text-indent: -9999px;
+}
+.createNewListText {
+ margin-left: 287px;
+ font-size: 1.3em;
+}
+.noscriptsubmit {
+ display: block;
+ float: right;
+}
+.scriptsubmit {
+ display: none;
+ float: right;
+}
+/*#endregion*/
+/*#region -----------------------------Tables*/
+table th {
+ padding: 8px;
+ border: none;
+ background-color: #dedede;
+}
+table td {
+ border: none;
+ padding: 8px;
+ background-color: #ffffff;
+ vertical-align: middle;
+}
+/*#endregion*/
+/*#region -----------------------------Misc*/
+.jquery-dialog {
+ display: none;
+}
+
+.imageLink {
+ border: 0px;
+}
+
+.formActions a {
+ text-decoration: underline;
+ padding: 0 3px 0 3px;
+}
+/*#endregion*/
\ No newline at end of file
diff --git a/examples/blobuploader/public/css/reset.css b/examples/blobuploader/public/css/reset.css
new file mode 100644
index 000000000000..2096f8ea7d96
--- /dev/null
+++ b/examples/blobuploader/public/css/reset.css
@@ -0,0 +1,48 @@
+/* http://meyerweb.com/eric/tools/css/reset/
+ v2.0 | 20110126
+ License: none (public domain)
+*/
+
+html, body, div, span, applet, object, iframe,
+h1, h2, h3, h4, h5, h6, p, blockquote, pre,
+a, abbr, acronym, address, big, cite, code,
+del, dfn, em, img, ins, kbd, q, s, samp,
+small, strike, strong, sub, sup, tt, var,
+b, u, i, center,
+dl, dt, dd, ol, ul, li,
+fieldset, form, label, legend,
+table, caption, tbody, tfoot, thead, tr, th, td,
+article, aside, canvas, details, embed,
+figure, figcaption, footer, header, hgroup,
+menu, nav, output, ruby, section, summary,
+time, mark, audio, video {
+ margin: 0;
+ padding: 0;
+ border: 0;
+ font-size: 100%;
+ font: inherit;
+ vertical-align: baseline;
+}
+/* HTML5 display-role reset for older browsers */
+article, aside, details, figcaption, figure,
+footer, header, hgroup, menu, nav, section {
+ display: block;
+}
+body {
+ line-height: 1;
+}
+ol, ul {
+ list-style: none;
+}
+blockquote, q {
+ quotes: none;
+}
+blockquote:before, blockquote:after,
+q:before, q:after {
+ content: '';
+ content: none;
+}
+table {
+ border-collapse: collapse;
+ border-spacing: 0;
+}
\ No newline at end of file
diff --git a/examples/blobuploader/server.js b/examples/blobuploader/server.js
new file mode 100644
index 000000000000..df0cc497fd1a
--- /dev/null
+++ b/examples/blobuploader/server.js
@@ -0,0 +1,135 @@
+var path = require('path');
+if (path.existsSync('./../../lib/azure.js')) {
+ azure = require('./../../lib/azure');
+} else {
+ azure = require('azure');
+}
+
+var express = require('express');
+var formidable = require('formidable');
+var helpers = require('./helpers.js');
+
+var app = module.exports = express.createServer();
+// Global request options, set the retryPolicy
+var blobClient = azure.createBlobService(azure.ServiceClient.DEVSTORE_STORAGE_ACCOUNT, azure.ServiceClient.DEVSTORE_STORAGE_ACCESS_KEY, azure.ServiceClient.DEVSTORE_BLOB_HOST).withFilter(new azure.ExponentialRetryPolicyFilter());
+var containerName = 'webpi';
+
+//Configuration
+app.configure(function () {
+ app.set('views', __dirname + '/views');
+ app.set('view engine', 'ejs');
+ app.use(express.methodOverride());
+ // app.use(express.logger());
+ app.use(app.router);
+ app.use(express.static(__dirname + '/public'));
+});
+
+app.configure('development', function () {
+ app.use(express.errorHandler({ dumpExceptions: true, showStack: true }));
+});
+
+app.configure('production', function () {
+ app.use(express.errorHandler());
+});
+
+app.param(':id', function (req, res, next) {
+ next();
+});
+
+//Routes
+app.get('/', function (req, res) {
+ res.render('index.ejs', { locals: {
+ title: 'Welcome'
+ }
+ });
+});
+
+app.get('/Upload', function (req, res) {
+ res.render('upload.ejs', { locals: {
+ title: 'Upload File'
+ }
+ });
+});
+
+app.get('/Display', function (req, res) {
+ blobClient.listBlobs(containerName, function (error, blobs) {
+ res.render('display.ejs', { locals: {
+ title: 'List of Blobs',
+ serverBlobs: blobs
+ }
+ });
+ });
+});
+
+app.get('/Download/:id', function (req, res) {
+ blobClient.getBlobProperties(containerName, req.params.id, function (err, blobInfo) {
+ if (err === null) {
+ res.header('content-type', blobInfo.contentType);
+ res.header('content-disposition', 'attachment; filename=' + blobInfo.metadata.filename);
+ blobClient.getBlobToStream(containerName, req.params.id, res, function () { });
+ } else {
+ helpers.renderError(res);
+ }
+ });
+});
+
+app.post('/uploadhandler', function (req, res) {
+ var form = new formidable.IncomingForm();
+
+ form.parse(req, function (err, fields, files) {
+ var formValid = true;
+ if (fields.itemName === '') {
+ helpers.renderError(res);
+ formValid = false;
+ }
+
+ if (formValid) {
+ var extension = files.uploadedFile.name.split('.').pop();
+ var newName = fields.itemName + '.' + extension;
+
+ var options = {
+ contentType: files.uploadedFile.type,
+ metadata: { fileName: newName }
+ };
+
+ blobClient.createBlockBlobFromFile(containerName, fields.itemName, files.uploadedFile.path, options, function (error) {
+ if (error != null) {
+ helpers.renderError(res);
+ } else {
+ res.redirect('/Display');
+ }
+ });
+ } else {
+ helpers.renderError(res);
+ }
+ });
+});
+
+app.post('/Delete/:id', function (req, res) {
+ blobClient.deleteBlob(containerName, req.params.id, function (error) {
+ if (error != null) {
+ helpers.renderError(res);
+ } else {
+ res.redirect('/Display');
+ }
+ });
+});
+
+blobClient.createContainerIfNotExists(containerName, function (error) {
+ if (error) {
+ console.log(error);
+ } else {
+ setPermissions();
+ }
+});
+
+function setPermissions() {
+ blobClient.setContainerAcl(containerName, azure.Constants.BlobConstants.BlobContainerPublicAccessType.BLOB, function (error) {
+ if (error) {
+ console.log(error);
+ } else {
+ app.listen(process.env.port || 1337);
+ console.log("Express server listening on port %d in %s mode", app.address().port, app.settings.env);
+ }
+ });
+}
\ No newline at end of file
diff --git a/examples/blobuploader/views/display.ejs b/examples/blobuploader/views/display.ejs
new file mode 100644
index 000000000000..c9b1edcae39b
--- /dev/null
+++ b/examples/blobuploader/views/display.ejs
@@ -0,0 +1,39 @@
+
+
+
Blobs Available
+ <% if (serverBlobs.length > 0) { %>
+
+ <% for (var i = 0; i < serverBlobs.length; i++) { %>
+
+ <%= serverBlobs[i].name %>
+
+
+
+
+
+
Are you sure you want to delete <%= serverBlobs[i].name %>?
+
+
+ <% } %>
+
+ <% } else { %>
+ Nothing to see here. Click to upload.
+ <% } %>
+
\ No newline at end of file
diff --git a/examples/blobuploader/views/error.ejs b/examples/blobuploader/views/error.ejs
new file mode 100644
index 000000000000..ebaf718296b4
--- /dev/null
+++ b/examples/blobuploader/views/error.ejs
@@ -0,0 +1,4 @@
+
+
Error
+
There was a problem processing your request. Please try again.
+
\ No newline at end of file
diff --git a/examples/blobuploader/views/index.ejs b/examples/blobuploader/views/index.ejs
new file mode 100644
index 000000000000..e46231e4215a
--- /dev/null
+++ b/examples/blobuploader/views/index.ejs
@@ -0,0 +1,4 @@
+
+
Blob Uploader
+
Use this site to upload to Azure blob storage
+
\ No newline at end of file
diff --git a/examples/blobuploader/views/layout.ejs b/examples/blobuploader/views/layout.ejs
new file mode 100644
index 000000000000..3097c09b40d1
--- /dev/null
+++ b/examples/blobuploader/views/layout.ejs
@@ -0,0 +1,30 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/examples/blobuploader/views/upload.ejs b/examples/blobuploader/views/upload.ejs
new file mode 100644
index 000000000000..55f699cd883c
--- /dev/null
+++ b/examples/blobuploader/views/upload.ejs
@@ -0,0 +1,26 @@
+
+
+
+
\ No newline at end of file
diff --git a/examples/blog/views/blog_show.ejs b/examples/blog/views/blog_show.ejs
new file mode 100644
index 000000000000..f08ab7458c90
--- /dev/null
+++ b/examples/blog/views/blog_show.ejs
@@ -0,0 +1,17 @@
+
+ <%-title%>
+
+
+ <% if (post.created_at) {%>
+
+
+ Posted on: <%-post.created_at%>
+
+
+ <% }%>
+
+
+ <%-post.body%>
+
+
+
\ No newline at end of file
diff --git a/examples/blog/views/index.ejs b/examples/blog/views/index.ejs
new file mode 100644
index 000000000000..04fdc179191e
--- /dev/null
+++ b/examples/blog/views/index.ejs
@@ -0,0 +1,31 @@
+
+
\ No newline at end of file
diff --git a/examples/myevents/views/error.ejs b/examples/myevents/views/error.ejs
new file mode 100644
index 000000000000..7f66ead80d00
--- /dev/null
+++ b/examples/myevents/views/error.ejs
@@ -0,0 +1,2 @@
+
<%= title %>
+
<%= message %>
\ No newline at end of file
diff --git a/examples/myevents/views/index.ejs b/examples/myevents/views/index.ejs
new file mode 100644
index 000000000000..94aabb0dfedf
--- /dev/null
+++ b/examples/myevents/views/index.ejs
@@ -0,0 +1,36 @@
+