Code Monkey home page Code Monkey logo

anvil-beginner's Introduction

=========== ANVIL DOCUMENTATION ==========================

This file describes how to use anvil for building graphical user interface in python

Narration : Anvil is the one of the streaming GUI builder that can be used to make our code more interesting and complete. We can build our own apps using Anvil by sign up on https://anvil.work and then design our apps. Anvil file will be treated as the client, our code on Google Colaboratory, Jupyter Notebook, Spyder, or also etc as the server by connecting a special key.

In my learning, I used Google colaboratory to build the apps.

First, we have to open Anvil, sign up, and then create our own apps. I give you a simple example. Below is the example of my design on Anvil.

1

To connect with our code in Google Colaboratory or Jupyter Notebook, we have to activate the Uplink, generate the key, and then run it into our base. Our base code will be treated as the server.

2

Generate the key, copy the uplink, and also code as the bridge.

3

We have to install the Anvil server, run the connection, and then create a function as usual with some parameter. Don't forget to call the callable using @anvil.server.callable

4

Because we want to make a calculation when "Hitung" button is clicked, so we will create a call function inside the button. The step is, from design pattern, double click the button, and you will see function of button click. We have to make sure that button fuction that we call is button_click (...).

Then, we define the result as the variable and we have to connect to our server using anvil.server.call ("function name", param1, param2, ... ). To get the value from the text box, we only call by self.textboxname.text and if we wanna set into another text box, we only create self.textboxresult.text.

5

Finally, we can run the application by clicking RUN button above the dashboard. And see, our application already deployed and can be accessed well.

6

NOTE :

  1. This is the simple application for an example, we can develop our app based on our creativity and our liking
  2. We have to connect to internet to run the app and the server should be ran over and over

anvil-beginner's People

Contributors

rikowijayanto avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.