Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

inui

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

inui

Powerful and Highly Customizable Python Library for UI

  • 1.0.0.7
  • PyPI
  • Socket score

Maintainers
1

INUI

Documentation Status

UniLand
Powerful and Highly Customizable Python Library for UI
GitHub Documentation Channel Support


Py INUI

INUI is a powerful and highly customizable Python language library for UI, which supports all the components and elements of the html markup language in Python, as well as the ability to use libraries such as Bootstrap, etc. And it brings a new experience of easier work with frontend in Python.

Contents

Requirements

Python Compatibility

This Library is written entirely in python. tested versions are python 3.11, 3.10, 3.9, 3.8, 3.7 while older versions should not cause any problem, we recommend using the latest version of python3.

Dependencies

This package requires the following packages:

How to Use?

read the documentation for more information

Installation

Just run following command in the Terminal or CMD

pip install inui --upgrade
Syntax

The syntax of INUI package is very easy, you have some building blocks like HTML tags and you have to order them to create a new bigger block and in the last, you have your full project.

Supppose that the you want to create Hello World! project. your buildin block is:

H1("Hello World!")

Now you want to create application that contains N times Hello World!, in here we just put it in the Body tag and use our python code to create our goal. See here:

n = 10
list_of_h1 = [H1("Hello World!"+str(i)) for i in range(1,n+1) ]
Body(list_of_h1)

In the big picture we have some classes that take some values, first one is data that couldbe peice of text, or HTML code or another Elements (if the lentgh of giving data is bigger than one, we have to put them in the list,tuple or set and after use them) and second one is attribues, like this:

output = Html(data=(
    Comment("this is black door =`) "),
    Head(
        (
            Title("Wiki Clone"),
            Meta(charset="utf-8"),
            Meta(
                name="viewport",
                content="width=device-width, initial-scale=1.0",
            ),
            Link(rel="stylesheet", href="./style.css"),
        )
    ),
    Body(
        (

            Div(
                (
                    Div(
                        (
                            H1("search wiki"),
                            Span("light", id="theme-toggler"),
                        ),
                        classs="header-container",
                    )
                ),
                classs="container",
            ),
            Form(
                (
                    Input(
                        typee="text", placeholder="search wiki", id="search-input"
                    ),
                    Button(typee="submit", text="search",
                           id="search-button"),
                ),
                id="search-form",
            ),
            Div(id="search-results"),
            Script(src="./script.js"),
        ),
    ),
),)

print(output)

Supported Elements

idHTMLINUIidHTMLINUIidHTMLINUI
1'<> </> 'BaseElement45figureFigure89emEm
2</>BaseVoidElement46fontFont90prePre
3!DOCTYPE htmlDoctype47footerFooter91progressProgress
4abbrAbbr48formForm92qQ
5acronymAcronym49frameFrame93rpRp
6addressAddress50framesetFrameset94rtRt
7aA51headHead95rubyRuby
8appletApplet52headerHeader96sS
9areaArea53h1H197sampSamp
10articleArticle54h2H298scriptScript
11asideAside55h3H399sectionSection
12audioAudio56h4H4100smallSmall
13baseBase57h5H5101sourceSource
14basefontBasefont58h6H6102spacerSpacer
15bdiBdi59hgroupHgroup103spanSpan
16bdoBdo60hrHr104strikeStrike
17bgsoundBgsound61htmlHtml105strongStrong
18bigBig62iframeIframe106styleStyle
19blockquoteBlockquote63imgImg107subSub
20bodyBody64inputInput108supSup
21bB65insIns109summarySummary
22brBr66isindexIsindex110svgSvg
23buttonButton67iI111tableTable
24captionCaption68kbdKbd112tbodyTbody
25canvasCanvas69keygenKeygen113tdTd
26centerCenter70labelLabel114templateTemplate
27citeCite71legendLegend115tfootTfoot
28codeCode72liLi116thTh
29colgroupColgroup73mainMain117theadThead
30colCol74markMark118timeTime
31commentComment75marqueeMarquee119titleTitle
32dataData76menuitemMenuitem120trTr
33datalistDatalist77metaMeta121trackTrack
34ddDd78meterMeter122ttTt
35dfnDfn79navNav123uU
36delDel80nobrNobr124varVar
37detailsDetails81noembedNoembed125videoVideo
38dialogDialog82noscriptNoscript126wbrWbr
39dirDir83objectObject127xmpXmp
40divDiv84olOl
41dlDl85optgroupOptgroup
42embedEmbed86optionOption
43fieldsetFieldset87outputOutput
44figcaptionFigcaption88pP

Supported Attributes for each Element

idHTMLINUIidHTMLINUIidHTMLINUI
1classclasss22itemiditemid89elementtimingelementtiming
2idid23itempropitemprop90forforr
3srcsrc24itemrefitemref91maxmax
4namename25itemscopeitemscope92maxlengthmaxlength
5contentcontent26itemtypeitemtype93minmin
6charsetcharset27langlang94minlengthminlength
7stylestyle28noncenonce95multiplemultiple
8hrefhref29partpart96patternpattern
9autocapitalizeautocapitalize30popoverpopover97readonlyreadonly
10accesskeyaccesskey31slotslot98relrel
11accessskeyaccessskey32spellcheckspellcheck99requiredrequired
12autofocusautofocus33tabindextabindex100sizesize
13contenteditablecontenteditable34titletitle101stepstep
14dirdir35translatetranslate102typeetypee
15draggabledraggable36virtualkeyboardpolicyvirtualkeyboardpolicy103placeholderplaceholder
16enterkeyhintenterkeyhint37acceptaccept104texttext
17exportpartsexportparts38autocompleteautocomplete105scopescope
18hiddenhidden39capturecapture106colspancolspan
19inertinert40crossorigincrossorigin107aria-describedbyaria_describedby
20inputmodeinputmode41dirnamedirname108aria-labelaria_label
21isiss42disableddisabled109selectedselected

LICENSE

Distributed under the MIT License. See LICENSE for more information.

Keywords

FAQs


Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc