![38% of CISOs Fear They’re Not Moving Fast Enough on AI](https://cdn.sanity.io/images/cgdhsj6q/production/faa0bc28df98f791e11263f8239b34207f84b86f-1024x1024.webp?w=400&fit=max&auto=format)
Security News
38% of CISOs Fear They’re Not Moving Fast Enough on AI
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Giotto is a python web framework. It encourages a functional style where model, view and controller code is strongly decoupled.
Key Features of Giotto include:
Install and create base project files::
pip install giotto
mkdir demo
giotto create http
Now your project is initialized. Open the manifest.py
and add the following::
from giotto.programs import ProgramManifest, GiottoProgram
from giotto.views import jinja_template, BasicView
def multiply(x, y):
x = int(x or 0)
y = int(y or y)
return {'x': x, 'y': y, 'result': x * y}
manifest = ProgramManifest({
'multiply': GiottoProgram(
model=[multiply],
view=BasicView(
html=jinja_template('multiply.html'),
),
),
})
Now create a file called multiply.html
::
<!DOCTYPE html>
<html>
<body>
{{ data.x }} * {{ data.y }} == <strong>{{ data.result }}</strong>
</body>
</html>
Or if you're too lazy to make a template,
set the view
keyword argument to just BasicView()
to use the generic view.
Run the development server::
$ giotto http --run
Point your browser to http://localhost:5000/multiply?x=3&y=3
.
Additionaly, try http://localhost:5000/multiply.json?x=3&y=3
.
You can also invoke your multiply program through the command line::
$ giotto create cmd
$ giotto cmd multiply --x=4 --y=2
Also::
$ giotto cmd multiply.html --x=4 --y=2
You can also use positional arguments::
$ giotto cmd multiply/4/6
Links:
.. _Group: https://groups.google.com/forum/#!forum/giotto-framework/ .. _giottoblog: https://github.com/priestc/giottoblog/ .. _documentation: http://giotto.readthedocs.org/en/latest/index.html
FAQs
Web development simplified. An MVC framework supporting Python 3.
We found that giotto demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Research
Security News
Socket researchers uncovered a backdoored typosquat of BoltDB in the Go ecosystem, exploiting Go Module Proxy caching to persist undetected for years.
Security News
Company News
Socket is joining TC54 to help develop standards for software supply chain security, contributing to the evolution of SBOMs, CycloneDX, and Package URL specifications.