Skip to main content

NateDhaliwal-Package

This is a package that allows Python functions to be used better, with less lines of code.


Installation

To install this package, enter this command line: pip install natedhaliwal

This package allows you to type in colour by specifying the name of the colour as one of its many functions.
The program displays the text in the specified colour, which is red, in this case. At the end of the line, the program removes any effects that may continue onto the next line.

With natedhaliwal, you can also open, create, read, overwrite and add data to and from the file.

You can allow the program to wait a specified number of seconds, clear the console or output, generate a random number in the specified range, pick a random item from the specified list, and even scrape websites as well!

In addition, you may convert JSON data, and vice-versa. Perfect for dealing with large JSON files!


Examples of code

Functions

  • display(text, colour,typewriter): Displays text in the output, with an optional color or effect feature, or a typewriter-style display. If the colour field is left empty, it acts like a normal print() statement.

    The list of colours/effects are:

    • Bold
    • Italic
    • Underline
    • Red
    • Pink
    • Yellow
    • Green
    • Blue
    • Purple
    • Grey

The typewriter must be specified when using it, setting it to True. It's off by default.
  • clear(): Clears the output screen.
  • randnum(start, end): Gets a random integer from the range given.
  • randlist(listName): Picks a random value from a provided list.
  • randfloat(start, end): Gets a random float from the range given.
  • wait(seconds): Pauses the program for the specified number of seconds.
  • scrape(website_url): Scrapes the given website and returns the data in JSON format.
  • jsontodict(json_data): Converts JSON data to a dictionary.
  • dicttojson(dict_data): Converts a dictionary to JSON.
  • overwritefile(filename, data): Writes the data to the specified file and removes previous data.
  • writefile(filename, data): Adds the data to the specified file.
  • createfile(filename): Creates a new file with the specified name.
  • readfile(filename): Reads the specified file and returns the data.

More coming soon!

Metadata

Release files for natedhaliwal 1.3.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for natedhaliwal 1.3.2
File Size Uploaded
natedhaliwal-1.3.2.tar.gz 3.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for natedhaliwal 1.3.2
File Interpreter ABI Platform
natedhaliwal-1.3.2-py3-none-any.whl Python 3 none any Details

Total release size: 8.5 kB

Release files / natedhaliwal-1.3.2.tar.gz

Download URL natedhaliwal-1.3.2.tar.gz
Size 3.9 kB
Tags Source
SHA-256 checksum
How to use checksums
aafe9e8042dafceb3f9a509fc44ba0247b8727ae8d376465fc2ada520d8ae115
BLAKE2b-256 checksum
How to use checksums
5de51afb704ff0aab4d23210e2fe08e77aa6b0e17d3d77b36d243e9a93fd9298
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.11

Release files / natedhaliwal-1.3.2-py3-none-any.whl

Download URL natedhaliwal-1.3.2-py3-none-any.whl
Size 4.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1948cffe919fd71603c08b71f6be2ba315edf9c9493c4838eb4f521195cec2c5
BLAKE2b-256 checksum
How to use checksums
c1f246b9f398aa082af979081bd17bad7888522ed9e1b22ea119e96177b67a32
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.11

Release history Release notifications | RSS feed

This release

1.3.2 This release

2 release files

1.3.1

2 release files

1.3.0

2 release files

1.2.2

2 release files

1.2.1

2 release files

1.2.0

2 release files

1.1.8

2 release files

1.1.1

2 release files

1.1.0

2 release files

1.0.8

2 release files

1.0.7

2 release files

1.0.5

2 release files

1.0.4

1.0.3

2 release files

1.0.2

2 release files

1.0.1

1 release file

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page