Skip to main content

A simple package to help code Python easier.

Project description

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 number from the range given. - `randomlist(listName)`: Picks a random value from a provided list. - `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!

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

natedhaliwal-1.2.1.tar.gz (3.9 kB view details)

Uploaded Source

Built Distribution

natedhaliwal-1.2.1-py3-none-any.whl (4.5 kB view details)

Uploaded Python 3

File details

Details for the file natedhaliwal-1.2.1.tar.gz.

File metadata

  • Download URL: natedhaliwal-1.2.1.tar.gz
  • Upload date:
  • Size: 3.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.11

File hashes

Hashes for natedhaliwal-1.2.1.tar.gz
Algorithm Hash digest
SHA256 346b28a52b2803181cfd46f8b366c25bbb8d3479ef2492eb6c10a7d1a5343544
MD5 423987abdd90eb1cbf793b24b78ae9f0
BLAKE2b-256 a00da1cf9501e7caa20255c1abd58919ca563662bfdf601b7d53a6b7a5e2f251

See more details on using hashes here.

File details

Details for the file natedhaliwal-1.2.1-py3-none-any.whl.

File metadata

  • Download URL: natedhaliwal-1.2.1-py3-none-any.whl
  • Upload date:
  • Size: 4.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.11

File hashes

Hashes for natedhaliwal-1.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4ac108334cbec7dddf97732b6658733643b4a8ea0f532cd3d38a96247067df8c
MD5 1e45a7ac289148deb7b0a860b04d29f4
BLAKE2b-256 453a97845bf54ee9f440dad9b86b629635e922a29888b3b58f3698c08acd6722

See more details on using hashes here.

Supported by

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