Getting all assets with alpaca-py

Hi, is there any way to get a list of all assets or all stocks with alpaca-py? It was possible with the REST api but I can’t find the function now. Or is there a way to authenticate and access https://data.alpaca.markets/v2/assets ? It only gives me 404 or 403 errors.

Thank you!

Okay, I found a solution:

from alpaca.trading.client import TradingClient
client = TradingClient(api_key_paper, api_secret_paper)
assets = client.get(‘/assets’)

For some reason, it only works with paper trading keys and the trading client for me.
Well, feel free to post a prettier solution!