BD103
@BD103
Hi! I program mainly in Rust, but also have experience in Python. Interested in concurrency, neural networks, and low-level programming.
~ The Internet ~
0
Java existsToday I was disappointed to find out that spamming semicolons is valid Java code. (View Main.java in the file explorer.)
It doesn't work for Kotlin though, since it doesn't require semicolons between statements.
https://pl.kotl.in/acoE_VPct
3
0
0
2
Fortune Teller Thing of Epicness-ness WooA... fortune teller? Made for Day 7 of Replit Creates.
19
4
2
Mindstormer010 It's pretty good...and...
Screen Shot 2022-11-13 at 4.50.39 PM5 months ago
3
Find a StoryThis website is a book suggestor. It asks you a few questions, then runs all of the books through a hit/misses algorithm based on your query. If you would rather browse all of the books, there is a library for that. With each book, I've included metadata and a review about them. I have personally read each book that gets suggested, and vouch for them accordingly.
I'm a little bit late, but this is my submission for Day 3 of the Replit Creates challenge. I hope you guys enjoy it!
Edit
I just realized that is site is not mobile-responsive in the slightest. For the best viewing experience, I recommend opening up the site in a new tab. Sorry about that!
26
0
3
0
Find Something RandomA website that randomly showcases epic repls from week 1 of Replit Creates. Made for Day 5 of Replit Creates.
20
0
0
7
EmoScriptWelcome to EmoScript, an esoteric scripting language that only uses emojis (and the occasional number). Made for Replit Creates, Day 4.
199
15
7
2
Something that AgesA cool pulsing square effect that uses various noise functions and color. Made for Replit Creates, day 2.
Controls
Space: Change noise type
R: Reset age
Esc: Close program
18
0
2
0
Worst Website PossibleSubmission for Day 1 of Replit Creates
11
0
0
0
ImagineA console-based pixel art creation tool.
(Or basically just me messing around with LodePNG and Termion.)
Please read README.md for instructions on how to use.
Feel free to share your creations in the comments! (If they are appropriate, of course.)
Faster loading update!
Imagine is now pre-compiled, meaning you no longer have to wait before you run it first!0
ImagineA console-based pixel art creation tool.
(Or basically just me messing around with LodePNG and Termion.)
Please read README.md for instructions on how to use.
Feel free to share your creations in the comments! (If they are appropriate, of course.)
32
1
0
BD103 Imagine is now pre-compiled, meaning you no longer have to wait before you run it first!10 months ago
0
Apothems-PFind the area of regular polygons giving the number of sides and apothem of each.
17
0
0
2
RainSome beautiful console rain to spend 20 seconds on.
Console Rain
Hello! I created this small little script with the Blessings wrapper. Enjoy!2
Flask Rich ExampleThis is an example of using the Flask-Rich extension for Python.
32
4
2
BD103 [Flask-Rich](https://pypi.org/project/flask-rich/) is a Python package that I recently made. It makes developing Flask applications a lot easier.
## Background
[Rich](https://pypi.org/project/rich/) is a programming library that I discovered a year back. It allows functionality for tables, fancy prompts, and more.

> The [Rich API](https://rich.readthedocs.io/en/latest/) makes it easy to add color and style to terminal output. Rich can also render pretty tables, progress bars, markdown, syntax highlighted source code, tracebacks, and more — out of the box.
## What does Rich-Flask do?
It adds many Flask-specific features with a lot of customizability. Here is an example:

## Installation
There are different installation processes based on different environments. Choose yours:
- [PIP](#pip)
- [Poetry](#poetry)
- [Replit](#replit)
- [Git](#git)
### PIP
Installing Flask-Rich with PIP is very easy. If you want it global (available to all projects), type:
```shell
# Also updates an existing version if you already have it
python -m pip install -U flask-rich
```
If you are using a virtual environment, try this:
```shell
# Create venv
python -m venv .venv
# Activate
source .venv/bin/activate
# Install
python -m pip install -U pip
python -m pip install -U flask-rich
```
### Poetry
This environment is even easier than PIP! Make sure you have an existing pyproject.toml file with `poetry init`:
```shell
poetry add flask-rich
```
For more information on using Poetry, [check out their website here](https://python-poetry.org/).
### Replit
If you don't have a home computer, you can use Replit. Follow [this guide here](https://docs.replit.com/programming-ide/installing-packages#searching-for-and-adding-packages) and type in flask-rich.
### Git
If you want the most bleeding-edge tech, you can clone the repository with Git. **This version is most likely unstable and may have unresolved bugs!**
```shell
# Git
git clone https://github.com/BD103/Flask-Rich.git
cd Flask-Rich/
# Poetry
poetry lock
poetry install
poetry shell
```
You can then make this global by running the following (not recommended):
```shell
poetry build
cd dist/
# Replace the asterisks with the version
pip install -U Flask_Rich-*.*.*-py3-none-any.whl
```
## Usage
Flask-Rich works like a classic Flask extensions. It is a class that you pass the app object into.
### Single File
```python
# app.py
from flask import Flask
from flask_rich import RichApplication
app = Flask(__name__)
rich = RichApplication(app)
@app.route("/")
def index():
...
```
`RichApplication` initializes everything necessary.
### Multiple Files (Complex Projects)
If you use a more complex project structure and want to avoid circular imports, you can have a project structure like this:
```
project/
__init__.py
app.py
bridge.py
...
```
```python
# bridge.py
from flask_rich import RichApplication
# You can also import other extensions like Flask-SQLite
rich = RichApplication()
```
```python
# app.py
from flask import Flask
from .bridge import rich
def create_app(name: str) -> Flask:
app = Flask(name)
rich.init_app(app)
...
return app
```
### Configuration
Flask-Rich gets its configuration from the [`Flask.config`](https://flask.palletsprojects.com/en/2.0.x/config/) object. All options have the `RICH_` prefix and can be found [here](https://github.com/BD103/Flask-Rich#class-options). For the configuration to work, it has to be set **before** initializing your `RichApplication` instance.
If you pass your app into `RichApplication` on its creation (like the single file example), you have to set the config before even creating this object.
```python
app = Flask(__name__)
app.config["RICH_LOGGING_MARKUP"] = False
rich = RichApplication(app)
```
If you use the `RichApplication.init_app(app)` function (complex project example), you just have to set the config before then.
```python
app = Flask(__name__)
rich = RichApplication()
app.config["RICH_TRACEBACK_SHOW_LOCALS"] = True
rich.init_app(app)
```
## Contributing
Rich-Flask is a generally small codebase. With the [core file](https://github.com/BD103/Flask-Rich/blob/v0.3.0/src/flask_rich/core.py) less than 100 lines of code as of version 0.3.0, there's not much room for confusion. If you have any suggestions for the package, do tell! I check Github regularly, so a nice [comment in the issues section](https://github.com/BD103/Flask-Rich/issues) of the repo is very helpful.
---
Thank you for checking out my corner of the internet! You can find me making the occasional blog post and coding project. Special thanks [Will McGugan for the Rich libary](https://github.com/willmcgugan/rich) and the [people at Pallets for Flask](https://github.com/pallets/flask).
Bye! :>1 year ago
BD103 You can find the original post [here](https://bd103.github.io/2021/11/17/flask-rich.html) on my blog. (Some links are broken on the Replit version.)1 year ago
2
Flask Rich ExampleThis is an example of using the Flask-Rich extension for Python.
Guide to Flask Rich
Flask-Rich is a Python package that I recently made. It makes developing Flask applications a lot easier.
Background
Rich is a programming library that I discovered a year back. It allows functionality for tables, fancy prompts, and more.
An example of Rich
> The Rich API makes it easy to add color and style to terminal output. Rich can also render pretty tables, progress bars, markdown, syntax highlighted source code, tracebacks, and more — out of the box.
What does Rich-Flask do?
It adds many Flask-specific features with a lot of customizability. Here is an example:
Rich's logging with Flask
Installation
There are different installation processes based on different environments. Choose yours:
PIP
Poetry
Replit
Git
PIP
Installing Flask-Rich with PIP is very easy. If you want it global (available to all projects), type:
Also updates an existing version if you already have it
python -m pip install -U flask-rich
If you are using a virtual environment, try this:
Create venv
python -m venv .venv
Activate
source .venv/bin/activate
Install
python -m pip install -U pip
python -m pip install -U flask-rich
Poetry
This environment is even easier than PIP! Make sure you have an existing pyproject.toml file with poetry init:
poetry add flask-rich
For more information on using Poetry, check out their website here.
Replit
If you don't have a home computer, you can use Replit. Follow this guide here and type in flask-rich.
Git
If you want the most bleeding-edge tech, you can clone the repository with Git. This version is most likely unstable and may have unresolved bugs!
Git
git clone https://github.com/BD103/Flask-Rich.git
cd Flask-Rich/
Poetry
poetry lock
poetry install
poetry shell
You can then make this global by running the following (not recommended):
poetry build
cd dist/
Replace the asterisks with the version
pip install -U Flask_Rich-..*-py3-none-any.whl
Usage
Flask-Rich works like a classic Flask extensions. It is a class that you pass the app object into.
Single File
app.py
from flask import Flask
from flask_rich import RichApplication
app = Flask(name)
rich = RichApplication(app)
@app.route("/")
def index():
...
RichApplication initializes everything necessary.
Multiple Files (Complex Projects)
If you use a more complex project structure and want to avoid circular imports, you can have a project structure like this:
project/
init.py
app.py
bridge.py
...
bridge.py
from flask_rich import RichApplication
You can also import other extensions like Flask-SQLite
rich = RichApplication()
app.py
from flask import Flask
from .bridge import rich
def create_app(name: str) -> Flask:
app = Flask(name)
rich.init_app(app)
...
return app
Configuration
Flask-Rich gets its configuration from the Flask.config object. All options have the RICH_ prefix and can be found here. For the configuration to work, it has to be set before initializing your RichApplication instance.
If you pass your app into RichApplication on its creation (like the single file example), you have to set the config before even creating this object.
app = Flask(name)
app.config["RICHLOGGINGMARKUP"] = False
rich = RichApplication(app)
If you use the RichApplication.init_app(app) function (complex project example), you just have to set the config before then.
app = Flask(name)
rich = RichApplication()
app.config["RICHTRACEBACKSHOW_LOCALS"] = True
rich.init_app(app)
Contributing
Rich-Flask is a generally small codebase. With the core file less than 100 lines of code as of version 0.3.0, there's not much room for confusion. If you have any suggestions for the package, do tell! I check Github regularly, so a nice comment in the issues section of the repo is very helpful.
Thank you for checking out my corner of the internet! You can find me making the occasional blog post and coding project. Special thanks Will McGugan for the Rich libary and the people at Pallets for Flask.
Bye! :>7
ProxyThis is the client code for a proxy server that I made. Because I value people's privacy, the proxy is closed-source. This website should make connecting and using it really easy! Make sure to updoot and follow and like and subscrib and anything else that people say.
:D
1.7K
27
7
Hello. I've been a user of Replit for over a year. I've been trying to get Java 16 with Nix, but it refuses to work. I've even followed the tutorial a
MatthewParry3 If you're doing something simple, yes. I've been using Replit for over a year and I've had to stop using it because many of my previous workflows or very specific set ups don't work. (Either the replit package list isn't update to the nix-os list or some functions like "nix search" simply don't work).
Nix in Replit still feels like a prematurely released alpha9 months ago
Hello. I am currently making an internet-based game, and would like a few popular websites to sprinkle around the game like easter-eggs. It's hard to