EMPTY Python Repl takes 134 MB of storage

There are new rules: storage is account-wide, not for every project. But every blank Python repl takes 134 megabytes. There is no such storage usage in another languages. Will it be changed in a future or we can create only 20 GB / 134 Mb projects even on hacker plan?

3 Likes

Hi @veslo , welcome to the forums!
Replit installs lots of unnecessary packages in Python repls. You can go to the pyproject.toml file to delete them.

1 Like

Sorry, pyproject.toml, not .replit.

Thanks for it! I leave only these (I suppose they are necessary):

[tool.poetry.dependencies]
python = ">=3.10.0,<3.11"
replit = "^3.2.4"

But it still take more than 70 megabytes. Even Java project uses zero at start, Node.js less than 10 Mb

I see. Replit package has the following Dependencies:

  • typing_extensions
  • Flask
  • Werkzeug
  • aiohttp
  • requests
  • pyseto
  • protobuf
  • aiohttp-retry

Awful

1 Like

Even if remove everything from packages in .toml file Python Repl takes 71 megabyte.

1 Like


Although you can remove all packages using pyproject.toml, replit uses a packager called poetry and because poetry is written in python and requires packages, and because some packages are built-in to python, there are still some packages (which are usually required or necessary) in the venv/ directory. This cannot be changed unless the default packages are relocated. Consider creating a support ticket regarding this issue.

3 Likes

Not to mention packages, but every Python Repl includes a venv (virtual environment) with every binary and stuff that is required to use Python. One of the reasons being that package installations are not possible without root access, which Replit does not provide.
It looks like Replit does not use a venv anymore.


I just ran a test, which would display the most spacious file in the directory. This is on the Beta Python template, which is only accessible if Explorer is enabled.

Screenshot 2023-07-22 10.10.15 AM

It looks like a huge improvement compared to a venv.

3 Likes

For my account, I create an empty Python repl, it takes 0.281GiB, that is 288MiB.

2 Likes

Duplicate topic to Storage calculations

2 Likes

whaaa thats weird how would you sideload custom modules then?

1 Like

So, it seems that Replit’s new beta Python template is using Nix functionality rather than a venv?

main.py after creating a new Python Repl (with Explorer enabled)

# Hello! This is a beta version of the Python template using
# Replit's new Nix module system. If you run into any
# issue using it, please let us know at
# https://ask.replit.com/
# 
# Thank you!
#
# If you'd like to opt-out of using the beta template,
# turn off the explorer role in the account page.

I don’t really understand how it works, but it’s a storage improvement nonetheless, so I am satisfied.

4 Likes

And it has pyright now! I mean it can be annoying, but I like it.

2 Likes

@veslo I think it might be the packager files that exist by default.

2 Likes