Metadata-Version: 2.1
Name: natedhaliwal
Version: 1.2.2
Summary: A simple package to help code Python easier. Long functions with difficult parameters? Shortened!
Home-page: https://github.com/NateDhaliwal/NateDhaliwal-Package
License: MIT
Author: Nate Dhaliwal
Author-email: nathaniel.shaan@gmail.com
Requires-Python: >=3.7,<4.0
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Natural Language :: English
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Requires-Dist: requests (>=2.31.0,<3.0.0)
Project-URL: Bug Tracker, https://github.com/NateDhaliwal/NateDhaliwal-Package/issues
Project-URL: Repository, https://github.com/NateDhaliwal/NateDhaliwal-Package
Project-URL: Replit, https://replit.com/@NateDhaliwal/natedhaliwalpackage
Description-Content-Type: text/markdown

# NateDhaliwal-Package
This is a package that allows Python functions to be used better, with less lines of code.
<br>
<hr>

## Installation
To install this package, enter this command line:
`pip install natedhaliwal`
<br><br>
This package allows you to type in colour by specifying the name of the colour as one of its many functions.
<br>
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.
<br><br>
With `natedhaliwal`, you can also open, create, read, overwrite and add data to and from the file.
<br><br>
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!
<br><br>
In addition, you may convert JSON data, and vice-versa. Perfect for dealing with large JSON files!
<hr>


## 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
<br>
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.
<hr>

## More coming soon!
