Skip to main content

A library for open Python project

Project description

MoreUpdate

Some Added stuff for python 3

MoreUpdate ae just add more and will more stuff for faster coding.

  • Faster coding
  • More shorter code

Features

  • Explicit Type Function
  • Constant Value
  • Explicit Type Variable

Installation

Install the dependencies and devDependencies

pip install MoreUpdate

Tutalrial

1.Explicit Type Function

from explict import Function,TYPE


def foo(bar): #wanted bar is a string...
	print(bar)

# Used : Function(Your_def,..Some type with TYPE.<TYPE>.get())
foo = Function(foo,TYPE.STRING.get())


#.call(argument) to call that function
foo.call("Hello")

foo.call(123) #Error goes here!
Hello
TypeError: type of 123 <class 'int'> is not <class 'str'>
[Finished in 233ms]

2.Constant

from explict import Constant

a = Constant("123")

a.get() # return "123" no set

3.Explicit Type variable

from explict import Var

a = Var("123")

a.get() # return "123"

a.set("1234") # Fine
print(a.get()) # 1234

a.set(123) #Uh oh...
print(a.get())
1234
TypeError: 123 Have type of <class 'int'> not <class 'str'>
[Finished in 95ms]

4.All TYPE built-in

from explict import TYPE,Constant,Function

# TYPE.STRING.get() # String type "Hello"
# TYPE.INT.get() # Integer type 123
# TYPE.FLOAT.get() # Float type 1.23
# TYPE.OBJECT.get() # Dict or Object type {"a":1}
# TYPE.BYTE.get() # Byte like b'123'
# TYPE.ARRAY.get() # That array type []

#Create Your own TYPE
class MyType:
	def __init__(self,v):
		self.v = v

	def say(self):
		print(f"Hi {self.v}")

TYPE.MYTYPENAME = Constant(MyType("Some example Value"))

#used your type

def sayhi(mytype):
	mytype.say()

sayhi = Function(sayhi,TYPE.MYTYPENAME.get()) # <class '__main__.MyType'>


A = MyType("123")
sayhi.call(A)
sayhi.call("123")
Hi 123
TypeError: type of 123 <class 'str'> is not <class '__main__.MyType'>
[Finished in 194ms]

5.FS in Python

from explict import fs

def CallBack(err):
	if(not err):
		print("Done")

fs.writeFile("filename.txt","Some content",CallBack)
# fs.appendFile Will append text like before
Done
[Finished in 294ms]
from explict import fs

def printl(line):
	print(line)


fs.linebyline("filename.txt",printl)
Hello
This
is
the
content
of
the
file
[Finished in 294ms]

6.Secure Function (beta)

from explict import Secure


# Some getting info from client

email = "who@gmail.com"
plaintext = "12345678"
# Secure.hash(Text,Digest)
hashtext = Secure.hash(plaintext) # 125 Digits default of 25 digest 250000000 case test no collision...

print(email,hashtext)

# Do something to store the hash

# Compare 

guess = "12345678"

if(hashtext == Secure.hash(guess)):
	print("Right!")
who@gmail.com 4ba87acc46d6b6dc56b706d9a6a6b9e706b9b6868689594979b6070c66a61696b9e9a699e3931393639333934633539623961393939363732396363356334633
Right!
[Finished in 513ms]

More Comming Soon...

Video comming soon..

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

MoreUpdate-1.0.7.tar.gz (9.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

MoreUpdate-1.0.7-py2.py3-none-any.whl (6.8 kB view details)

Uploaded Python 2Python 3

File details

Details for the file MoreUpdate-1.0.7.tar.gz.

File metadata

  • Download URL: MoreUpdate-1.0.7.tar.gz
  • Upload date:
  • Size: 9.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.1

File hashes

Hashes for MoreUpdate-1.0.7.tar.gz
Algorithm Hash digest
SHA256 e07993879c2360f3afbaa7dd848157dae96a7478bb5e14d06cd9f02bf0cb7112
MD5 5eb52b3cf6454fc3e15303007a6e84ed
BLAKE2b-256 90180ab0cab82bda6577920d5d48f824322f83da4bd4ca4d40cd589ba875a8eb

See more details on using hashes here.

File details

Details for the file MoreUpdate-1.0.7-py2.py3-none-any.whl.

File metadata

  • Download URL: MoreUpdate-1.0.7-py2.py3-none-any.whl
  • Upload date:
  • Size: 6.8 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.1

File hashes

Hashes for MoreUpdate-1.0.7-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 6ba271afd6b0052a97288c555debe54713eb000f3be334932c9b5992d615c957
MD5 bb9eef6945af370238efe2b4283cb49d
BLAKE2b-256 4fbd51c36d21b065a391c3ad0295f508ec02d5009d85f46067e5b6aae35be85b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page