Skip to main content

general python features that don't come with it.

Reason this release was yanked:

OLD

Project description

PyLib - General

This is a package that will be updated whenever I get an idea that I like and write it.

So far, I have:

  • Properties
  • Math

Properties

This can be used like:

from pylib_general import properties

This loads the Property class, which can be used like:

varname = properties.Property()

The property class's functions are:

  • varname.add(name, val)

name being the name of the new value (cannot contain spaces), and val being the value.

  • varname.remove(name) name being the name of the value to remove

  • varname.get(name) returns the value of name

The difference between Property and other sets is that you can get a property in a much easier way:

varname.attr

Obviously, you can also get a value through varname.get(name) but you could also do varname.name

Ex:

varname = Property().add("somenamenotcontainingnumbersorspaces", "12233090")
print(varname.somenamenotcontainingnumbersorspaces)

prints 12233090

Math

This can be used like:

from pylib_general import math

This loads the math functions, which are:

  • math.factorial(n)

Where n is the number you want to factorial, returns n!

  • math.sig(n)

Where n is the number you want to sigma, returns n + (n-1) + (n-2) ...

  • math.pow(n, p)

Where n is the number you want to raise to the power of p. Returns n**p

  • math.incr(n)

Where n is the number to increment by 1

  • math.decr(n)

Where n is the number to decrement by 1

  • math.mod(n, d)

Where n is the number to modulo with d. Returns n % d

  • math.get\_fibo(terms)

Where terms is the number of terms of the Fibonacci sequence you want to get. Returns array.

  • math.pi Equals 22/7

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

pylib-general-0.1.1.tar.gz (14.9 kB view details)

Uploaded Source

Built Distribution

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

pylib_general-0.1.1-py3-none-any.whl (15.3 kB view details)

Uploaded Python 3

File details

Details for the file pylib-general-0.1.1.tar.gz.

File metadata

  • Download URL: pylib-general-0.1.1.tar.gz
  • Upload date:
  • Size: 14.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.10

File hashes

Hashes for pylib-general-0.1.1.tar.gz
Algorithm Hash digest
SHA256 134532ccd428fbed05af82a6beb25b20c55ba944189bf109cf4f324644957aeb
MD5 9ca34b2c3df54000af808c7648697944
BLAKE2b-256 ba244d611377827ad21042352bb804672a6339f21a83cce032a1bd0cdf5f0fe1

See more details on using hashes here.

File details

Details for the file pylib_general-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: pylib_general-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 15.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.10

File hashes

Hashes for pylib_general-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d0bebfdaa245713cc182c2c88625dfcb9559f55c74dfd37ca7c259d4ac256258
MD5 fafeceffded797efe1f8d0e9f8965e7f
BLAKE2b-256 632e459ad292c10d097043520ca0ebb1972816e0508abd2982a71cb51163f561

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