I'm just curious for future reference, how exactly would I link a python program and how would the code be worded to a html document.
Thanks in advance
Here is a list of frameworks you can check out:
https://wiki.python.org/moin/WebFrameworks
I prefer Django but that's just a personal opinion:
https://www.djangoproject.com/
Frameworks make it easier than ever to build applications and websites. Learn python well, learn how the web works, follow a few tutorials (for example the django tutorial) and you are ready to start developing.
Here is how Django works with templates(html):
https://docs.djangoproject.com/en/1.11/intro/tutorial03/
You could use frameworks like django and flask.
i always prefer flask. its simple and light
Related
I am new to web-sites field and I was wondering if you can make a simple personal website using only python (NO HTML, CSS, JS) and flask. I was searching a bit on the internet and didn't find any good examples.
Is it possible? And if it is any code examples?
I vould appreciate if you have any suggestions or exaples.
Here is what I want my website to look like(it doesn't need to have this many functions): https://palletsprojects.com/
Flask can be used for making realy simple websites with only basic text on them. But if you want a more developed website with more functions and a nicer desing you need to use html and css, and than you can use flask and python to implement 'logic' to them.
Here is a python flask tutorial:https://www.youtube.com/watch?v=MwZwr5Tvyxo
I am quite new to coding, and have limited experience with HTML and Python. I would like to develop a web page for personal use, and I thought it might be easier to starter with a template and customize it from there. Can anyone recommend a place to find some free templates, or know a good place to start looking?
I learned how with Flask using this tutorial. It's for creating a blog, but you can apply the concepts to other types of websites.
It is time consuming and will feel cumbersome at first, but it teaches you some extra things you need to know if you want the web page to be interactive, store data, etc.
Start Bootstrap is a great starting place! https://startbootstrap.com/ It has free, open source templates that you can use and let you become more comfortable with bootstrap.
Although I do recommend going through W3 tutorials https://www.w3schools.com/html/ and really familiarizing yourself with HTML and CSS if web development is of interest to you.
I have 10 line python code and a third party python library that I want to use in a html website. I do not want to use a full fledged framework like django to complete the task. I want to use the following library https://github.com/nficano/pytube in my project. Thank You looking forward for some assistance.
The most simple thing come to my mind is following.
1) You'll need to use some sort of WSGI (https://uwsgi-docs.readthedocs.io/en/latest/, for example), to serve your script as a web service.
2) You'll also need a little bit of JavaScript code to make AJAX (for example) requests to that script.
I wrote a fairly complex script using URLLIB and BeautifulSoup, and last night I wondered if there was any way to produce the same results as a web application.
I'm not asking for a tutorial, but can someone point me in the general direction of how/what proficiency's would be needed to write an application that would let someone input scraping criteria, and a URL, and output the correct source, all in a webpage?
For a basic one page web application, I'd recommend integrating your existing code into one of the available python web micro-frameworks. Try Flask to start; this framework is lightweight and seems ideal for your use-case (another options is bottle, and pyramid and django for larger apps). The tutorials for these frameworks should be enough to get you on the right track.
This week, I want to start a web mapping and data visualization site for my work.
Unfortunately, I just found out my work place will be using Drupal in a few months down the road. (Most of my web development experience is with App Engine.)
My problem is that I need to make sure my web application embeds nicely into the larger Drupal site that outside consultants plan to make.
I am most comfy with Python, and I was expecting to use the Python-Django combo instead. There are important python libraries and modules I must have that cant be found or re-written in PHP.
I was thinking I will avoid all django on the web pages so things dont get confusing when the Drupal switch is made.
I will have the javascript on the web page make calls to python on the server which then spits out JSON data, and I think this will stay the same even after the Drupal switch.
Does this make sense?
Any general or specific suggestions that may guide me are greatly appreciated!
If you write API calls and utilize Drupal Services module, you can hook into just about anything and send/receive JSON/XML data.