#python-discussion

1 messages · Page 93 of 1

timber plinth
#

Hello, everyone. Brand new here, and brand new to coding. Looking to change careers. Any advice for a brand new coder just starting out?

#

Most frequent starting point (besides learning the language) is: seek community. Here I am....

golden mortar
#

Do a lot of projects

#

Super simple ones to begin with, and gradually increase the complexity

#

Ask for help here if you get stuck or lost

exotic tundra
#
class ASSET_PATH:
    @staticmethod
    def get_absolute_resource_path(relative_path):
        try:
            base_path = sys._MEIPASS2
        except Exception:
            base_path = os.path.abspath(".")
        return os.path.join(base_path, relative_path)
    class IMG:
        class LOGO:
            GUI = get_absolute_resource_path(...) # get_absolute_resource_path is not defined
#

please help

#

IDK why it thinks it is not defined

#

I defined it on top

golden mortar
exotic tundra
#

Because the function is only used within this class and never anywhere else.
Grouping stuff that belongs together is less noisy.

golden mortar
unborn lagoon
golden mortar
harsh swallow
#

You have levels of nesting classes. That's not normal. Logo logically should be a child of Img, not class inside a class. And getting paths for separate resources shouldn't be in separate classes at all, unless those classes also represent those things.

exotic tundra
#
class ASSET_PATH:
    class IMG:
        class LOGO:
            @staticmethod
            def get_absolute_resource_path(relative_path):
                try:
                    base_path = sys._MEIPASS2
                except Exception:
                    base_path = os.path.abspath(".")
                return os.path.join(base_path, relative_path)
            GUI = get_absolute_resource_path(...) # get_absolute_resource_path is not defined
#

This would work

unborn lagoon
exotic tundra
#

But I want this function to be accessible in the whole class.
Not just subclass.

cerulean ravine
cerulean ravine
golden mortar
#

I think nesting classes like this is a very strange choice, yeah.

exotic tundra
#

OH YOU HAV' PROBLEM.
DO WORKAROUND HAHA, LOL, U R WELCOM

#

thanks buddy

cerulean ravine
harsh anchor
#

that is a lot of nesting

timber plinth
# golden mortar Put what you study into practice asap

Ty, I am super new to all this... 3 weeks new. By "do a lot of projects", you mean make many simple programs, correct? I have been doing exercises and tutorials on sites like genepy and freecodecamp and exercism but just kind of feeling lost as a self teacher. Am I on the right path? Using Python Crash Course (3rd Edition) as a learning resource.

golden mortar
#

You'll have to start simple, but you can work your way up.

exotic tundra
cerulean ravine
golden mortar
# exotic tundra ```py class ASSET_PATH: class IMG: class LOGO: @staticme...
import os
import sys


class ASSET_PATH:
    class IMG:
        class LOGO:
            @staticmethod
            def get_absolute_resource_path(relative_path):
                try:
                    base_path = sys._MEIPASS2
                except Exception:
                    base_path = os.path.abspath(".")
                return os.path.join(base_path, relative_path)

            GUI = get_absolute_resource_path(
                "."
            )  


logo = ASSET_PATH.IMG.LOGO()
print(logo.GUI)
``` This seems to work for me at least.
exotic tundra
#

My initial question was about:

class ASSET_PATH:
    @staticmethod
    def get_absolute_resource_path(relative_path):
        try:
            base_path = sys._MEIPASS2
        except Exception:
            base_path = os.path.abspath(".")
        return os.path.join(base_path, relative_path)
    class IMG:
        class LOGO:
            GUI = get_absolute_resource_path(...) # get_absolute_resource_path is not defined
rugged summit
exotic tundra
cerulean ravine
rugged summit
#

does now descriptions more clear, unambigous, logical?

cerulean ravine
golden mortar
exotic tundra
golden mortar
#

So this would work:

import os
import sys


class ASSET_PATH:
    @staticmethod
    def get_absolute_resource_path(relative_path):
        try:
            base_path = sys._MEIPASS2
        except Exception:
            base_path = os.path.abspath(".")
        return os.path.join(base_path, relative_path)


class IMG:
    class LOGO:
        GUI = ASSET_PATH.get_absolute_resource_path(
            ...
        )  
#

Because ASSET_PATH finishes initializing before you call the static method.

quasi shuttle
#

guys are there any reputable jwt/jwe libraries that support both encryption + signing ?

cerulean ravine
cerulean ravine
rugged summit
#

oh ok

cerulean ravine
#

@exotic tundra can you say more about why you want IMG nested inside ASSET_PATH? I would think the class AssetPath would be just about path names, not involving Img. I could see Img making use of an AssetPath class.

eager smelt
edgy krakenBOT
#

JSON Web Token implementation in Python

Released on <t:1732765409:D>.

exotic tundra
#

If it can't be done I guess I have to define the function before defining the class, I dislike that because I can't group it together even though the function is never used outside the class.

#

Thanks anyway

quasi shuttle
eager smelt
#

!pypi authlib

edgy krakenBOT
#

The ultimate Python library in building OAuth and OpenID Connect servers and clients.

Released on <t:1765526501:D>.

cerulean ravine
eager smelt
cerulean ravine
#

Imagine you had a program that only used len() in one place inside a class. That doesn't mean len() should be defined in the class.

ember quest
#

so i was seeing a video on people's opinions about copilot today

#

and apparently some people also think LSPs are bad?

#

for learning

cerulean ravine
ember quest
#

not sure i dont understand why

#

its just plain convenient

ember quest
cerulean ravine
eager smelt
ember quest
#

mhm yeah

cerulean ravine
quasi shuttle
unborn lagoon
#

And LSPs would find things that you'd find when running the code anyways (you'd find them before though).

eager smelt
ember quest
#

whats the idea behind why it means you dont read docs as often?

#

the docstrings from the LSP?

#

theyre not all that helpful

unborn lagoon
#

I think by LSP you mean autocomplete, btw. LSPs do a bit more than autocomplete.

quasi shuttle
ember quest
unborn lagoon
ember quest
#

i freaking forget some of the library functionality a bunch of times and have to look up what method im even searching for

ember quest
#

ive just never heard the idea that LSPs are bad for learning before so i find it interesting

#

i grew up on no autocomplete cpp-

#

it was hell.

then no autocomplete c# cuz i couldnt get intellisenes to work on my VS (for unity)

#

not good times

sharp gyro
#

hey can anyone help me with something

sharp gyro
#

ty

golden mortar
#

I'm not sure what the issue with not reading docs would be.

frail stirrup
ember quest
golden mortar
#

If I find a function through LSP that looks like it does what I want, and I use it, I'm not just gonna leave it there and forget about it, I'm gonna actually run my code and see if it does what I want as well.

ember quest
#

some docs can be really nice i like reading them

#

things like numpy and pandas are great

#

i mean of course they are

frail stirrup
#

i got no idea what dimensions were

spice hill
#

(unless you mean that you read the LSP-provided docstring instead of the external docs)

unborn lagoon
green cloak
#

woah

#

does it usually take long to get voice perms

golden mortar
ember quest
#

do we have any copilot users in here?

golden mortar
spice hill
#

Sometimes LSPs autocomplete random things you definitely should not use. For example, pyright still autocompletes typing.Iterator, typing.Callable and such, which are deprecated, and the only way to figure that out is to read the typing module documentation from time to time

ember quest
golden mortar
spice hill
#

autocompletion is also how some people probably discover the _thread module that has methods that look like what you want

ember quest
spice hill
#

yep

golden mortar
ember quest
golden mortar
#

So I obviously like it.

unborn lagoon
ember quest
#

what's it like?

golden mortar
#

I mean, there are multiple ways to use it.

#

There's the autocomplete, ask and agent mode.

#

I'm hesitant about recommending it, because I think it can be harmful if you're not able to properly evaluate the output.

#

And while it works well for me, maybe it won't for a more inexperienced user.

compact loom
#

how do i install python on a linux machine?

golden mortar
#

But the autocomplete in particular saves me a lot of time, because it often guesses what I want to write and spares me from having to type it out manually.

golden mortar
eager smelt
ember quest
compact loom
ember quest
#

actually just apt install i think idk what the fuck apt-get is

eager smelt
#

though pyenv is usually recommended to manage multipel Python versions

golden mortar
eager smelt
#

apt is a user-friendly interface to apt-get

ember quest
eager smelt
#

(sorry meant to reply)

ember quest
#

but yeah through the package manager.

compact loom
#

im tryna remember my package manager lol

ember quest
#

or i think python's site does have downloads

eager smelt
compact loom
#

yeah thats it

golden mortar
compact loom
#

yeah cause i used it earlier

#

to get clang

golden mortar
#

No, I mean

ember quest
#

i mean it could be but its prolly not Pithon

golden mortar
#

Python

ember quest
#

and you should go get pithon because yes

compact loom
#

hmm let me check

eager smelt
#

they don't need to use the latest version

ember quest
ember quest
eager smelt
#

that happened before autocomplete was a thing too

ember quest
#

which sounds really concerning lol

compact loom
#

turns out it does come pre-installed

ember quest
#

i mean i just posted like yesterday here about how i put a colon into a c program because ive written exclusively python for so long

#

but its different than if i do write the language relatively often but just let autocomplete do the thing

ember quest
golden mortar
#

I just look it up again

ember quest
#

if you wanna play around with stuff, you could get the latest one.

visual juniper
ember quest
#

which apparently is a thing

#

again, never used it, so idk

golden mortar
#

But it's probably a good idea not to use AI too much when you're a beginner

#

Not for risk of forgetting but for not learning in the first place

ember quest
#

But I really don't have too much faith in those who do use AI when relatively new to coding

visual juniper
#

the argument that you have to remember syntax and do extreme measures like turn off LSP to do that is a little bit silly

#

you just get used to it the more you write

ember quest
#

I mostly haven't interacted with enough entire newbies who use GPT and stuff but I kinda know a few and it's interesting

#

I have a friend telling me she didn't get past day freaking 1 (part 1.) of AoC because some nebulous bug about the end points which she couldn't debug and she asked GPT and it couldn't help too much either and she went and just deleted her code so she can't show it to me either-?

coarse salmon
#

i think debugging is a skill, and gpt makes it really easy to not train that skill

ember quest
#

It's interesting. Kinda weird.

This friend I think just had a bad day though.

coarse salmon
#

ive been guilty of it too, where im over something so i just ask it to find the bug for me

golden mortar
#

As opposed to learning how to systematically isolate the causes of bugs.

#

There's like a right and wrong time to make use of AI and a beginner won't know which is which.

ember quest
quasi shuttle
#

is there a more efficient way to serialise/deserialise python classs? im currently using dataclasses and converting to a dict then json

dry pike
#

pickle methinks

ember quest
#

I don't think non-beginners check for equality with booleans lol.

eager smelt
#

!rule 6
don't advertise your LinkedIn posts

edgy krakenBOT
#

6. Do not post unapproved advertising.

hybrid nebula
#

Are there any 'mathematical' invariants for IEEE 754-compliant float arithmetic?

#

fixed-width integers are just modular arithmetic, and bigints follow normal integer arithmetic

spice hill
#

robustness strategies based on theology are pretty popular with floats

#

well, it is defined precisely, it's not like it's analog or anything

worn moth
sand hornet
#

pickle or pkl?

hybrid nebula
worn moth
cerulean ravine
silver plover
#

Is it me or is 'variant' the word of the year?

#

Everyone seems to be using it for everything.

#

(Or maybe I've been in a cave)

cerulean ravine
harsh swallow
#

I know pkl as portable keyboard layout - a program made using autohotkey that allows easily mapping keyboard layouts... I think the layouts for it also used .pkl as a convention

wise yarrow
#

though there are quite a few

#

specifically "invariant" being used to for a quantity that doesn't change after you do something

#

i can only think of one context off the top of my head where i've heard the term variant

silver plover
wet pagoda
#

tfw metalanguage for config files

spice hill
#

it's not uncommon

#

there's also dhall

rapid bridge
#

I do appreciate pkl for finally just making a hopefully sufficiently complex config language

sand hornet
cerulean ravine
frank marsh
#

Hi guys, im a bit of a silly goose.

In terms computer science is 0 and 1 a Boolean or an integer.

My teacher and basically everyone known to mankind says it’s a Boolean however my friend is saying it’s an integer?

I’m a bit new to this and would like to know 🙁

fiery yarrow
wet pagoda
#

yeah, they can be both

frank marsh
wet pagoda
fiery yarrow
#

are you currently taking this exam?

frank marsh
#

@twin tree

cerulean ravine
frank marsh
sand hornet
wet pagoda
#

if the question is a Python question then i'd say 0 and 1 are integers, but if you mean CS in general im gonna say booleans.

cerulean ravine
wet pagoda
#

but they really are just both

frank marsh
twin tree
#

But isn't 0 and 1 not considered integers unless it's directly specified that the 0 and 1 is bool values?

steel whale
cerulean ravine
#

bleh: ruff reformats fr"" to rf""

wise yarrow
#

personally i wouldn't call 0 and 1 booleans in a general context, but in certain contexts i might use the symbols 0 and 1 to denote false and true

sand hornet
#

The quotes might be around the wrong word

wet pagoda
#

pretty sure its the otherway around

#

ah wait nvm

thin latch
#

0 and 1 are considers as false and true, off and on, low and high by default.

sand hornet
wise yarrow
#

imo languages having truthiness/falsiness doesn't mean that the integers 0 and 1 are booleans automatically

granite wyvern
foggy idol
#

0 and 1 are symbols, and without assignment nor clarification of programming language you can't say what they'll be interpreted as I guess?

spice hill
#

something like that, yes

granite wyvern
spice hill
#

not every language even needs to have a separate bool concept

fiery yarrow
#

aye
they need separate trools instead

spice hill
#

(e.g.: unityped languages like B and Brainfuck)

granite wyvern
wet pagoda
#

C prior to C99 basically

foggy idol
#

yeah, I think it's valid to treat them just as their base glyphs when not given any context

#

especially if you wanna be not fun at parties

granite wyvern
spice hill
#

bool is an int in Python purely due to historical evolution. Python used to not have bool, instead the integers 0 and 1 were used to represent false and true. Later bool was added, and the only way to add it in a mostly backwards-compatible way was subclassing int

steel whale
#
True == 1      # True (why?)
True is 1      # False (i'm very confused)```
granite wyvern
wet pagoda
granite wyvern
wet pagoda
#

== has an arbitrary definition

granite wyvern
#

Different types, so cannot b the same object.

spice hill
steel whale
steel whale
sand hornet
foggy idol
#

this makes is None good, because conceptually None is also falsey

granite wyvern
#

promote int to float and compare.

steel whale
granite wyvern
#

Presumably if the int won't convert to float (eg too big) the comparison fails.

foggy idol
#

is there a == between an int and a float that succeeds but shouldn't?

spice hill
#

To be clear, that's not some special baked-in rule, that's just what float and int define in their __eq__ method. You could customize that for your own class

golden mortar
granite wyvern
spice hill
#

!e

print(0.0 == 300**42069)
edgy krakenBOT
spice hill
#

yeah, thankfully it doesn't crash or anything like that

golden mortar
#

Which makes sense, cause it can't be equal to a float if you can't cast it to a float

granite wyvern
#

!e

float(300**42069)
edgy krakenBOT
# granite wyvern !e ```py float(300**42069) ```

:x: Your 3.14 eval job has completed with return code 1.

001 | Traceback (most recent call last):
002 |   File "/home/main.py", line 1, in <module>
003 |     float(300**42069)
004 |     ~~~~~^^^^^^^^^^^^
005 | OverflowError: int too large to convert to float
wise yarrow
#

does less than work?

granite wyvern
#

As I hoped. False for the comparison, overflow for the conversion.

fiery yarrow
#

test it stickie

wise yarrow
#

!e

print(0.0 < 300**42069)
print(0.0 > -300**42069)
edgy krakenBOT
granite wyvern
#

!e

print(0.0 < 300**42069)
sand hornet
#

Forgot to print that

edgy krakenBOT
spice hill
#

!e Here's some potentially surprising behavior:

print(18014398509481984.0 == 18014398509481984)
print(18014398509481985.0 == 18014398509481984)
print(18014398509481985.0 == 18014398509481985)
``` I would at least hope that Python produced a syntax warning on `18014398509481985.0`
wet pagoda
#

whats 3.14j`?

edgy krakenBOT
spice hill
#

3.14 with JIT

wet pagoda
#

o

granite wyvern
#

Round off.

wise yarrow
wet pagoda
#

lol thanks

foggy idol
#

good PR for linters maybe thinkies

fiery yarrow
wise yarrow
#

i would only use log if i needed to refer to the multivalued logarithm and a specific branch of the logartihm at the same time

sand hornet
wet pagoda
#

me when the principle logarithm

sand hornet
#

My favorite thing about log is that you can make ln(x) == log(x) / log(e) iirc

spice hill
#

doesn't matter

wise yarrow
#

any base works as long as it's a valid base

steady rain
#

ah I see

sand hornet
fiery yarrow
#

slightly widerly phrased, log_a(x) == log_b(x) / log_b(a)

steady rain
sand hornet
#

Not weird, but more expanded // clearly defined

fiery yarrow
#

widerly. as in more generally and not just with euler's constant

wise yarrow
#

change of base is why people just write like O(n log n) without a base

#

because it doesn't matter

sand hornet
#

The general assumption is what the graph looks like. The base just changes the rate of change for said graph iirc

golden mortar
#

lonelily is, though

granite wyvern
golden mortar
charred tusk
#

@ daylily

fiery yarrow
#

there's nothing pingable there, shen

charred tusk
#

YKWIM

#

WTF is their username now??

#

oh, duh
I'm dumb

sand hornet
#

Felt

charred tusk
#

thanks

sand hornet
#

I really contributed to the conversation thumbsgene

charred tusk
#

I mean, I was just talking to myself

#

It's been extra lonely here lately, trying to stay out of my head

sand hornet
#

Y'know, that could be good.. Or sleep. Sleep is good.

charred tusk
#

Already had 13h of it
I missed dinner last night

sand hornet
#

;-;

#

Sick/cold?

charred tusk
#

No idea
Started my laundry at 16:30, then flopped in bed to do some Discord on my phone, and the next thing I knew I was waking up at 05:30

charred siren
#

so real

charred tusk
#

Passed right out
I wasn’t even tired (or so I thought)
I was hungry too
Dinner looked good, I’m upset I missed it
But I Uber Eats’ed burgers at 6am so that was fun

charred siren
#

written like a poet

golden mortar
#

<@&831776746206265384>

steady rain
#

!cpban 1449875724449222818

edgy krakenBOT
#
Bad argument

Could not convert "user" into UnambiguousMember or UnambiguousUser.
User "1449875724449222818" not found.

slender urchin
#

!compban 354712976055336961

steady rain
#

I'm so bad at this.

edgy krakenBOT
#

:incoming_envelope: :ok_hand: applied ban to @warped quiver until <t:1766093340:f> (4 days).

golden mortar
golden mortar
supple pelican
#

can anyone help me fix part of the code for my trading bot?

#

i can pay

steady rain
#

(this is a warning--you are not allowed to offer to pay.)

golden mortar
#

Since you typically submit numbers, and the above is what you often get if you submit the wrong one.

steady rain
supple pelican
steady rain
golden mortar
golden mortar
supple pelican
# steady rain No. Don't be cagey--what issue are you having?

in the section on signing transactions, i dont know exactly where my bot is failing
executed order: {'up': {'ok': False, 'error': "PolyApiException[status_code=400, error_message={'error': 'invalid signature'}]"}, 'down': {'ok': False, 'error': "PolyApiException[status_code=400, error_message={'error': 'invalid signature'}]"}}

edgy krakenBOT
#

Hey @supple pelican!

Please edit your message to use a code block

```py
print('Hello, world!')
```

This will result in the following:

print('Hello, world!')```
supple pelican
#
from eth_account import Account
from py_clob_client.client import ClobClient
from py_clob_client.clob_types import OrderArgs, OrderType
from py_clob_client.order_builder.constants import BUY

PRIVATE_KEY = "0xTU_PRIVATE_KEY_REAL"
ADDRESS = "0xTU_ADDRESS_REAL"

assert Account.from_key(PRIVATE_KEY).address.lower() == ADDRESS.lower()

client = ClobClient(
    host="https://clob.polymarket.com",
    key=PRIVATE_KEY,
    funder=ADDRESS,
    chain_id=137,
    signature_type=2,
)

creds = client.create_or_derive_api_creds()
client.set_api_creds(creds)

args = OrderArgs(
    token_id=TOKEN_ID,
    price=0.5,     
    size=5,        
    side=BUY,
)

signed = client.create_order(args)
resp = client.post_order(signed, OrderType.GTC)
print(resp)
golden mortar
charred tusk
supple pelican
#

thats not the problem

charred tusk
#

How do you know?

supple pelican
golden mortar
golden mortar
supple pelican
golden mortar
#

Or anyone else for that matter

supple pelican
#

nah chill im not stupd jsjj

golden mortar
#

Again, we don't do help in DMs on this server

supple pelican
#

ineed to fix that bro

supple pelican
golden mortar
#

Because using a help thread works just as well, and allows more people to help

#

as well as benefit from the answers

#

Why does it need to be in DMs?

supple pelican
granite wyvern
supple pelican
#

its not a free code or anything

golden mortar
#

Nobody's gonna steal your CLOB client sample code

supple pelican
#

i cant gift that on a public dc

#

yknw what am saying

supple pelican
charred tusk
#

IDEK what a CLOB is

supple pelican
#

the bot uses a strategy that cannot be made public

golden mortar
#

You got an invalid signature, that just means you can't make an API call

#

You don't need to paste your whole trading strategy to fix that

supple pelican
charred python
#

DMs are where you try to get some sucker to invest in your strategy. Or at least that's what happens with others. That's one reason we avoid DMs. Also it means one person is committing to helping one on one you which most people don't want to do.

supple pelican
charred python
#

Maybe not you, but hang out here for a day or two and see how many people we have trying to get people to DM them about opportunities.

golden mortar
golden mortar
#

I don't know what kind of wallet you have but make sure you follow the right steps for your wallet type

golden mortar
#

Try to get it to work with one of the basic examples from the readme and then once it works you can plug it into your real code

supple pelican
#

100% the problem is in the code

#

the wallet is good

granite wyvern
golden mortar
# supple pelican the wallet is good

I don't mean that your wallet isn't good, I mean that the code to configure the CLOB client has to be correct depending on the wallet type. See the readme.

granite wyvern
#

If your strategy is a secret, stuff it into its own file, provide a dumy strategy (eg "buy never" or buy once or something trite).

golden mortar
#

If you can make a basic API call work, that'll probably fix your issue with your real code.

glossy prism
#

how to check if there is sound in speakers using python?

slender urchin
#

on windows there's pycaw

edgy krakenBOT
#

Hey @proper nexus!

Please edit your message to use a code block

```py
print('Hello, world!')
```

This will result in the following:

print('Hello, world!')```
proper nexus
#

wops

south bison
#

completed my first two problems in leetcode :)

slender urchin
#

congrats :3

hybrid nebula
#

is there any way to do single-precision float arithmetic in Python?
not just converting 64-32 bit, but actually doing math

hybrid nebula
#

ooh

#

can that do all libm operations?

slender urchin
#

idk what a libm is

proper nexus
glossy prism
#

it's not python extension .h

hybrid nebula
glossy prism
#

it's c++

proper nexus
hybrid nebula
proper nexus
#

No Access yay

unborn lagoon
hybrid nebula
#

[(🦀)Rust Programming Language Commu…⁠ > # offtopic] for me

slender urchin
#

gmpy2 lets you make arbitrary precision floats too

hybrid nebula
rugged summit
#

You are given a list of mana crystals, each with a certain value. Every turn, all crystals regenerate their full value. Simulate 5 turns and calculate the total mana collected by summing the values of all crystals in each turn.

Mana Cascade better?

#

I think yes

hybrid nebula
rugged summit
#

yes

#

but before was

hybrid nebula
#

this is the actual code btw

rugged summit
#

A sequence of mana crystals regenerates each turn. Calculate the total mana collected after 5 turns.

#

yes here is not clear what to do

#

but by hiding what to do its harder to do but impossible or not?

#

yes got it actual code right

#

so here its not clear if its 5 * sum?

dry yacht
#

Obviously the 2-5 range is just an example and could be dynamically set instead

hybrid nebula
#

if it says 'regenerate 5 times' it might mean it's harvested 6 times (in the beginning or after each regen)

charred tusk
#

Oh hi Doctor

median stag
#

Pyphon is neet :D

jovial lava
#

It's that time of year again. I'm looking for the next years chess game. Each year I pick a new opening/gambit and play it for a solid year. Time for the next! Just got done with a year of the Cochrane gambit. What's next?

jagged belfry
#

It could be more complicated if they are only drained a certain amount, but if that is not specified, then answering "0" is not really a sane answer and so you should just assume they're fully utilized

rotund steppe
#

any python oop projects ideas?

cerulean ravine
fervent matrix
#

!kind got bunch of projects in general, you can just apply the oop there

edgy krakenBOT
#
Kindling Projects

The Kindling projects page contains a list of projects and ideas programmers can tackle to build their skills and knowledge.

brisk gazelle
#
"Does anyone know of a list of programming projects I could do?"

"!kind of."```
charred tusk
dry yacht
#

<@&831776746206265384>

steady rain
#

!cpban 439401731785490432

edgy krakenBOT
#

:incoming_envelope: :ok_hand: applied ban to @supple mango until <t:1766101018:f> (4 days).

acoustic spear
#

cp ban. jeez what did bro do

dry yacht
#

The typical 4 images Mr Beast smth scam

stray field
acoustic spear
tulip hedge
#

Hello everyone

#

I’m new here

cerulean ravine
tulip hedge
tight tree
#

Is it just me that finds multiline strings annoying to deal with? Are you not supposed to use them for actual outputs to the user?
The fact that leading spaces on each line are actually included makes it hard to format in code

cerulean ravine
#

or inspect.cleandoc()

frosty oriole
#

i usualy always end up using dedent with multiline strings

tight tree
#

I think I will just

output = (
    f"## {"You Did It" if self.completed else "You Got This"}!\n"
    f"**Goal:** {self.text}\n"
    f"**Repeat:** {self.repeat.display()}\n"
    f"**Reward:** {self.reward} Crumbs"
)
cerulean ravine
#
output = textwrap.dedent(f"""\
    ## {"You Did It" if self.completed else "You Got This"}!
    **Goal:** {self.text}
    **Repeat:** {self.repeat.display()}
    **Reward:** {self.reward} Crumbs
""")
frosty oriole
#

is the \ supposed to be there?

tight tree
#

No, thanks for the suggestion, but I dont want to have to call a function on it

cerulean ravine
tight tree
#

it becomes more unclear what is going on

frosty oriole
frosty oriole
#

it would for me, at least

tight tree
#

I have never seen dedent before

cerulean ravine
frosty oriole
#

interesting

cerulean ravine
tight tree
#

never even knew that there was a std package called textwrap

cerulean ravine
harsh anchor
frosty oriole
#

it is still personal preference, yes

cerulean ravine
harsh anchor
#

I like multiline strings, but without dedent. it can look wonky but you get what you see in the string

granite wyvern
frosty oriole
#

huh. i dont know why i didnt think of that before

#

that does seem cleaner than wrapping the whole multiline string in a function call

harsh anchor
#

you have to remember to do it, though, or maybe wrap it in a helper function. maybe annoying if you need it multiple times

edgy krakenBOT
#

lib/python/cs/lex.py line 435

def stripped_dedent(```
charred tusk
#

You go out of the way to put args on a different line
But then you put them all on the same line

fiery yarrow
#

shame there's no builtin helper function.
could even have dedent in the name.
alas

charred tusk
#

Hmm
Maybe we could suggest it

granite wyvern
granite wyvern
granite wyvern
grand tundra
#

hello

round orbit
#

yuoyo

cerulean ravine
granite wyvern
charred tusk
#

You use a yapper as your formatter?

#

(that is also a joke)

granite wyvern
#

Yap. I hate black and ruff.

#

Aye.

charred tusk
#

oh?

granite wyvern
#

O?

charred tusk
#

Oh hey look a PR from me

charred tusk
granite wyvern
#

Too opinionated and not tunable.

#

Ok for a "just have the entire team agree", crap if you actually care about things.

charred tusk
#

Fair
I'm the opposite
I don't really care so I love having strict tools to keep things consistent for me

granite wyvern
charred tusk
#

I don't even remember doing it so... 👍 I guess lol

barren valley
#

Yo what should I code?

charred tusk
fiery yarrow
#

shen do you want a dmca notice from nedbat or something

steel whale
charred tusk
charred tusk
steel whale
charred tusk
#

Are you gonna get TWD?

fiery yarrow
steel whale
#

in gonna get rpcs3 and play some of my favorites

charred tusk
#

I love sailing

steel whale
#

including tomb raider

#

don't we all

charred tusk
#

My dad didn't when the roomate got us sent a DCMA notice

cerulean ravine
charred tusk
#

Oh hai Ned

#

It's a meme?

cerulean ravine
charred tusk
#

fair

#

I need to update mine
I never finished loading the phrases directly from the story file

steel whale
#

also @charred tusk you should play Detroit become human, even the tuffest will get heartbroken by the story

#

it's just so peak

steel whale
#

oh

#

tuff I guess

#

first time I played it I actually cried for a bit

#

that's how peak it is

charred tusk
#

I think you read me backwards
I did get heartbroken

#

Am not tuff
Cried for like 12 hours straight last week

steel whale
#

ik I implicitly told myself

steel whale
charred tusk
#

Pretty much
||Had to say goodbye to the dog||
Was on and off all night long

steel whale
#

I was tearing up when I was doing this "iterative gameplay" where I do every single possible combination of choices and I went thru a several where I had to kill connor

charred tusk
#

Yep
Gonna have to change my PFP now

steel whale
#

wait wdym

#

did the dog just let go of life's touch? ||euthanasia?||

charred tusk
#

Oh
Yeah
Sorry, I know being "polite" is always opaque
||yeah, euthanasia||

midnight patrol
#

Hello :D

charred tusk
#

Howdy graciecowboy

sand hornet
#

What did I just…

midnight patrol
#

Is it possible to find actual jobs as software developers, particularly doing automation with python?
Or should I just switch to something else / give up?

frosty oriole
#

it is possible

#

kinda rough rn though

charred tusk
midnight patrol
#

:o
Okie ty

charred tusk
#

Hi Robin

frosty oriole
#

yo

midnight patrol
charred tusk
#

IDK what I wanna do with my name
I was memeing 🐕‍🦺 for a while
I actually wanted to be "wolfie" but I ended up as "doggo"
Maybe I commit to the bit and go full wolf now
Or maybe I quit being the weirdo with the emoji name

frosty oriole
#

how are you holding up

steel whale
charred tusk
# frosty oriole how are you holding up

Got like five different users at work who's software (all different ones) has decided to crash repeatedly, and they're all spamming me with messages about how they are the one that needs help first
I need Fish's GIF about going completely mental

steel whale
#

that's what I do in exams when the teacher leaves the room since everyone just goes completely hyper and shit

charred tusk
#

Whatever happened to quiet holidays??

#

I must be on the naughty list this year

sand hornet
charred tusk
#

Oh my DOG that would be glorious

sand hornet
#

Meanwhile you're just working on one of their issues watching the chat argue

charred tusk
#

But nah, I already know exactly who the priorities are

sand hornet
#

Fair enough

#

Need to ask your manager if you can anonymized group chats so they can argue who takes priority

barren valley
#

Bruh what should I do tonight

charred tusk
charred tusk
#

Yes?

rotund steppe
#

" yes?" 💀

barren valley
charred tusk
#

Then do something different

#

No ones forcing you to do a specific project idea

barren valley
#

I want suggestions tho

charred tusk
#

!projects There's lots of project ideas in the world

edgy krakenBOT
#
Kindling Projects

The Kindling projects page contains a list of projects and ideas programmers can tackle to build their skills and knowledge.

barren valley
charred tusk
#

based

#

Good luck blowing up Cloudflare

bleak brook
#

how do i get permission to speak in vc?

charred tusk
#

!voice

edgy krakenBOT
#
Voice verification

Can’t talk in voice chat? Check out #voice-verification to get access. The criteria for verifying are specified there.

barren valley
bleak brook
#

ty

#

when it says to be active does this mean i have to talk for a hour 30 minutes straight?

#

seems like a lot off time

charred tusk
#

not sure

frosty oriole
#

stops people from newly joining and saying random shit

barren valley
charred tusk
#

Cloudflare's entire selling point is anti-bot/anti-DDOS stuff
Discord uses Cloudflare
So to blow up Discord you gotta blow of Cloudflare first

barren valley
#

With all its problems

charred tusk
#

You did five seconds ago

barren valley
cerulean ravine
barren valley
#

I’m not

cerulean ravine
barren valley
cerulean ravine
edgy krakenBOT
#

5. Do not provide or request help on projects that may violate terms of service, or that may be deemed inappropriate, malicious, or illegal.

charred tusk
#

Hi again Ned
Ned have you ever tried to make your own language?

barren valley
cerulean ravine
frosty oriole
#

it seems inappropriate malicious and illegal

cerulean ravine
barren valley
charred tusk
#

I love the idea and I want to have one with my name on it just to say I did it
But every time I pick up Crafting Interpreters I end up with a headache and taking a break to walk the dog by the third paragraph

barren valley
cerulean ravine
frosty oriole
#

you should then ask a specific question about building a chat app

charred tusk
#

Chat apps are kinda annoying

#

Anything real-time sucks

barren valley
silver plover
#

Reminds me of a friend who believed that blogging and social media were a fad, and wouldn't last

charred tusk
#

What do they say now?

craggy willow
#

email will never catch on

charred tusk
#

Wait, people use email?

frosty oriole
charred tusk
#

Robin being embarrassed about waking up Mr. Bobby caught in 4k

silver plover
barren valley
#

So please don’t assume

charred tusk
#

They were so close to being based

cerulean ravine
charred tusk
#

was joke

silver plover
#

I have a new raspberry pi project. How to train my dog to stop barking.

charred tusk
#

Hooking it up to a spray bottle?

silver plover
#

I guess so. If -it- does it, I don't feel so bad

barren valley
charred tusk
#

for?

frosty oriole
#

presuming they're talking about their discord competitor, a web app

#

vercel is good for small, single developer projects
AWS for more serious stuff
in between those two there are a lot of options, basically any that provide you with a VPS will do

cerulean ravine
barren valley
charred tusk
#

huh

#

neat

silver plover
#

Until the dogs start working together, in order to get more treats.

charred tusk
#

Hey, if they teach each other to stop barking, then you've still won

pallid garden
#

writing an RCE in binary barks sounds a bit too difficult for dogs to accomplish

charred tusk
barren valley
pallid garden
#

i think

fiery yarrow
# charred tusk Hey, if they teach each other to stop barking, then you've still won

that program gives a treat to a dog when another dog barks, for distraction purposes. if the programs are present in multiple areas, with multiple dogs, and they somehow discover this, billobobbo is concerned about conspiracies to trigger multiple distraction treats via mutual barking, possibly at a higher rate than is already present

#

this would most likely not be considered as winning

pallid garden
#

billobobbo 😆

#

is that our version of bibibubo

cerulean ravine
bleak moth
pallid garden
#

vercel is expensive if you need to scale up, so it makes sense to write your app with the consideration of vendor lock-in

charred tusk
#

Vercel makes a pretty damn good product
But they have some pretty damn shitty business practices

They don't let you cancel your paid plan and go back to the free tier, you have to contact their support and they will delete your entire account.

They stopped supporting private repos on the free tier overnight, and didn't say anything until people complained, at which point they cited changelog entries from like six months ago, and promised they sent out an email that nobody actually got.

pallid garden
#

this take advantage of their free tier but dont get yourself locked in

sand hornet
#

I'm intending to derail because I saw a Vercel mention, I so badly want Anantaaaaaa ChillBar_dead

pallid garden
#

what's ananta?

sand hornet
#

Anime GTA

pallid garden
#

...

#

what

#

how does that relate to vercel

sand hornet
#

It's not full weeb but it looks so fun..

sand hornet
#

Anyways

charred tusk
#

Python!

sand hornet
#

I'm writing Swift 😭

charred tusk
#

Is it fun?

sand hornet
#

Sorta? It likes to do cursed things, but if you can't guarantee expected typing, it'll just fail to compile

barren sentinel
#

Python related thing I'm struggling with since I'm not good at generators:
I'm implementing a regex backtracking engine, and currently trying to use cameron's suggestion of implementing it with generators, but I'm unsure how to do the Repeat/Concat while still keeping it using lazy iteration.
My current matches functions all have the signature def matches(self, input: str, index: int) -> Generator[int]:

Focusing on Concat, I think I conceptually understand how it should function. Concat looks like this:

@dataclass
class Concat(Spanned):
    regexes: Sequence[RegexItem]

So the process of matching it would look like
For each regex in self.regexes, the starting index is the most recent result of the last regex's generator. If the current regex runs out of indexes, try again using the next index from the previous one. If the last index is reached, yield from it.
But I'm struggling hard to translate this into code

solar mantle
#

wsp

dusty ember
solemn rain
#

Good morning

dusty ember
#

pretty much 😩

barren sentinel
#

Update since I see you typing: Even with using Concat as a base for Repeat it still doesn't seem to be working correctly

granite wyvern
# barren sentinel Python related thing I'm struggling with since I'm not good at generators: I'm i...

Well you could do it recursively, where you recurse over regexes. What you want is a matcher for your single RegexItem which yields the matches in longest-first (or shortest-first) order, subject to matching the tail items.

Sketch:

class RegexItem:
    ....
    def match(self, text, offset, tail_items) -> Generator[int]:
      for end_offset in self.possible_match_end_offsets(text, offset):
        if not tail_items:
          yield end_offset # success, this is viable
        next_item, *new_tail = tail_items
        for next_offset in next_item.match(text, end_offset, new_tail):
            yield end_offset # tail matches, this is viable
#

You need to write possible_match_end_offsets for this item, whose sole job is to match the item itself to text at offset and yield end_offsets which indicate the end of each possible item match.

granite wyvern
serene urchin
#

..

harsh horizon
#

I work at the intersection of AI and Blockchain, building systems that are intelligent, secure, and easy for users to interact with. I also handle the full UI/UX and front-end development for mobile and web projects using React Native, React, and multi-stack environments.

I’m open to collaborating with clients or agencies who need support on AI-powered trading tools, decentralized platforms, or modern mobile solutions.

My areas of experience include:

  • AI / ML: Automated trading logic, predictive models, P2P optimization, AI system integration, Dify-based workflows, ML pipelines
  • Blockchain: Smart contract development, Ethereum/Solana ecosystems, dApps, token design
  • Frontend / Full-Stack: React Native, React.js, multi-stack workflows
  • Design: Practical and clean UI/UX aimed at smooth user experiences
  • Additional Tech: Python, Node.js, TypeScript, API work, cloud services

If anyone needs someone who can blend AI functionality with blockchain systems and deliver polished, reliable solutions, feel free to reach out privately anytime.

frosty oriole
charred tusk
#

!rule ad paid hire

edgy krakenBOT
#

6. Do not post unapproved advertising.

9. Do not offer or ask for paid work of any kind.

proud escarp
#

!rule 6 9

peak relic
#

nice

hoary cairn
#

after i finish w3school, is there any other content i should look into, to learn

#

for python the tut

brisk gazelle
#

Be finished with it now.

hoary cairn
brisk gazelle
#

!resources

edgy krakenBOT
#
Resources

The Resources page on our website contains a list of hand-selected learning resources that we regularly recommend to both beginners and experts.

young flare
#

Just learning concepts won't be enough

brisk gazelle
#

!kindling

edgy krakenBOT
#
Kindling Projects

The Kindling projects page contains a list of projects and ideas programmers can tackle to build their skills and knowledge.

hoary cairn
#

I use chat gpt to give me beginner projects lol

hoary cairn
young flare
hoary cairn
#

Nah it just gives me ideas

young flare
#

Cool

solemn rain
#

Give me a Ci/Cd workflow

#

example

edgy fractal
#

when converting a variable to another type i use the same name for both types because its more concise but pylance complains
how can i suppress this complaint or this practice is not recommended ?

solemn rain
#

You can't call a dog a cat

#

But depends

#

what are you converting

grave tree
#

Can you share your code that pylance is complaining about?

young flare
#

but share your code also

edgy fractal
grave tree
edgy fractal
solemn rain
#

i think its better to be explicit with the naming
But depends on the person

grave tree
#

That seems odd to do. Why not just combine it into one line if you're immediately re-assigning it?

hasty island
#

why not this

file_path = "path/to/file"
file = open(file_path, "r")
edgy fractal
hasty island
#

are you re-using the path anywhere else?

solemn rain
edgy fractal
hasty island
#

there comes a point where you abbreviate and add a comment instead - this is not that point

grave tree
edgy fractal
grave tree
#

Oh. So no

hasty island
#

a. I'd still use file_path and then file
b. might I suggest pathlib.Path.open ?

#

!d pathlib.Path.open

edgy krakenBOT
#

Path.open(mode='r', buffering=-1, encoding=None, errors=None, newline=None)```
Open the file pointed to by the path, like the built-in [`open()`](https://docs.python.org/3/library/functions.html#open) function does...
edgy fractal
hasty island
#

they show docstrings, idk if they show comments

hasty island
# edgy kraken

there's also read/write methods you get with the Path class

idle fulcrum
#

evening y'all

idle fulcrum
granite wyvern
#

Or do you mean:

x : int
# for holding x values
round orbit
#

hey

idle fulcrum
#

oh for type yeah

#

I figured they meant for a doc comment

idle fulcrum
#

so you put the doc comment after the variable?

hasty island
#

that's generally how doc-strings in python work

pallid garden
#

curious, jsdoc is before the variable

hasty island
#

after the class/function definition, that translates over here

idle fulcrum
#

I guess that's true, they typically go inside

hasty island
idle fulcrum
#

is that vscode?

hasty island
#

neovim

idle fulcrum
#

ah ok

hasty island
#

should work in vsc just the same

idle fulcrum
#

i wonder how wide the ide support is for documenting variables

hasty island
#

that is upto the lsp you're using

granite wyvern
idle fulcrum
#

i don't even think it's supported in java

hasty island
#

the editor probably shouldn't and doesn't make a distinction between variables and functions/classnames etc.

idle fulcrum
#

Ideally, though I think it would have to practically speaking

#

it needs a different route to identify all those things

#

but they should all be handled as identifiers

hasty island
#

that's your lsp/formatter/syntax highlighters job, which are plug and play for most modern editors

idle fulcrum
#

lsp certainly

#

the syntax highlighters are usually pretty dumb compared to the lsp

hasty island
#

there are extensions you can get on vsc on a per language basis

idle fulcrum
#

do you use source-highlight ?

hasty island
#

on neovim, I just stick to treesitter

idle fulcrum
#

I use it as a utility to just read source code and as a library on a couple applications, but it sadly misidentifies things all the time

#

I think it's probably token based

hasty island
#

vsc on the rare ocassion I use it is just mostly ootb

idle fulcrum
#

treesitter I've read about

#

is it mostly used in the vim ecosystem

#

.pypi treesitter

#

aw

#

i know there is an adapter package

hasty island
#

!pip tree-sitter

edgy krakenBOT
idle fulcrum
#

ah! there it is

#

what is the name you import it with

#

oh there's a dono banner on pypi now

hasty island
#

tree_sitter and tree_sitter_<language> for language specific extensions (that you install separately)

idle fulcrum
#

ah cool

hasty island
#

hm, I wonder why those are separate packages and not like package groups

idle fulcrum
#

is a package group a thing?

hasty island
#

might be using the wrong term but they exist

#

package[feature]

idle fulcrum
#

oh interesting

#

yeah I've seen those square brackets once before I think?

#

I wonder what that's all about

#

@inland karma probably knows

hasty island
#

specifying which parts and/or extra parts you want to get

idle fulcrum
#

it's about his time to get online

#

lol

patent kestrel
#

yea those are called extras

idle fulcrum
#

haha I just read that

hasty island
#

e.g in tree sitter I'd expect something like this
tree-sitter - core package
tree-sitter[full] - core package + all available extras
tree-sitter[python] - core package + python extras
and so on

idle fulcrum
#

!pep 508

edgy krakenBOT
idle fulcrum
#

with full

#

that would be what I'd install

#

so it's for "optional dependencies"

inland karma
#

good morning

inland karma
inland karma
hasty island
#

about extras

inland karma
idle fulcrum
#

how extensively is this used?

inland karma
#

very

#

almost all librraries use them, almost no packages use them

idle fulcrum
#

so tree sitter is just an odd one out

inland karma
#

it would be bad to have tree-sitter and tree-sitter-python under two names

idle fulcrum
#

since they didn't appear to organize their add-ons into official extra

idle fulcrum
inland karma
idle fulcrum
#

tree-sitter-python would be to parse python code wouldn't it

hasty island
inland karma
#

oh.. i see... yes i see

#

extra optiional dependencies are the solution to this problem for a package

hasty island
#

hm, is this issue worthy?

inland karma
#

it is our own fault as well, we dont share how awsome it is to use

inland karma
idle fulcrum
#

that's a big topic

#

i feel like python is in a constant cat and mouse game with its own packaging ecosystem

inland karma
#

yes, by design.. pun intended

idle fulcrum
#

at least the system we do have was intentionally designed

#

.pythonfact

verbal wedgeBOT
#
Python Facts

The Python logo is based on Mayan representations of snakes!

Suggestions

Suggest more facts here!

hasty island
#

hm, doesn't look like someone has brought it up before

idle fulcrum
#

the particular issue with extras?

hasty island
#

yeah

#

they have a discord, lemme try asking there

upper quartz
#

@broken flower

thorn mist
#

guys django or flask

hasty island
#

actually, looks like their whole project structure is fragmented like that

inland karma
#

btw, anyone heard about PythoC? i just came over the name today a few minutes ago

grizzled solar
#

PsychoC

peak relic
hasty island
thorn mist
#

alr

inland karma
#

i like and use django more, but i like that django has everything included

inland karma
#

i dont like to make all the choices myself

#

if you want full flexibility, you have to write everythiing yourself

#

and that is fine if you want that, go with flask and write everything yourself

peak relic
#

meaning it enforces you to build it in a certain way

peak relic
thorn mist
#

comparatively

inland karma
thorn mist
#

ok

inland karma
peak relic
#

and if you want something as simple like Flask but still like Django, you could look at NanoDjango

inland karma
#

and sometimes your backend just needs an api.. and then you have fastAPI as well

jagged linden
#

How do i code a phonetic alphabet maker that turns letters in a word into phonetic alphabets

jagged linden
#

Yep

peak relic
#

Maybe just hardcode the values into a dictionary

#

wait... did you mean radio call signs or the sound of the letter?

inland karma
#

well.. a mapping would work for both those

jagged linden
#

Just printing a string

peak relic
#

radio call signs are A for Alpha, B for Bravo, etc. Sounds of the letter would be like Ay, Bee, See...

jagged linden
#

Like turning a word into its phonetic form

inland karma
#

lets be explicit, are you talking about the NATO Phonetic ALphabet?

peak relic
jagged linden
#

Charlie, Alpha and Tango

#

The Nato Phonetic alphabet

inland karma
jagged linden
#

Can someone please make an example code

inland karma
#

do you know what a dict is?

sand jewel
half grotto
#

bro i completed the python lang. now i don't known what should i learn.. Like an libraries, A.I & ML, Data science, Data Analyse? can u people help me ?

jagged linden
#

An example code of my phonetic alphabet code

jagged linden
#

I don't know how to do it

inland karma
peak relic
jagged linden
#

I Know what a dict is

#

Oh that's how

inland karma
sand jewel
peak relic
slim knot
#

random q - anyone used Socrates AI for python project planning?
saw it on socratesai.dev, supposedly helps with architecture before coding. generates file structures, catches dependency/security gaps, etc.
wondering if it actually understands python specific stuff like package structure, virtual envs, extras (speaking of extras lol), or if it's just generic
might be useful for bigger django/fastapi projects? idk

half grotto
#

is dict stand for dictionary?

peak relic
sand jewel
inland karma
frosty oriole
slim knot
# peak relic never heard of it

well if you ever get the chance to try it out, it would be good to see if there is any sort of validation before I use it regularly

jagged linden
#

And how to detect if an input answer is not an integer, i am making a guess a number game

#

So it says "That's Not A Number" if anything other than a number is typed

slim knot
peak relic
half grotto
#

Do u have any free resource on data analyst?

peak relic
slim knot
inland karma
jagged linden
#

Ok thanks

half grotto
#

@sand jewel Do u have any free resource on data analyst?

inland karma
#

i would not go anywhere near youtube

sand jewel
peak relic
inland karma
sand jewel
peak relic
inland karma
#

but we have dedicated channels for a reason

mint loom
sand jewel
inland karma
peak relic
mint loom
inland karma
inland karma
inland karma
peak relic
sand jewel
inland karma
mint loom
bronze dragon
inland karma
#

!rule 1

edgy krakenBOT
inland karma
#

and you said you had read and understood this rule @mint loom

#
Being kind and courteous to others
Using welcoming and inclusive language
...
#

among many more things @mint loom

#

hope i made it more clear now!

inland karma
sand jewel
#

@peak relic why delte the video?

sand jewel
#

Ohh

inland karma
#

i dont really use the mobile client, so i keep forgetting you can do many things there as well

quasi shuttle
#

does anyone know if its possible to have fastapi accept a byte object as part of a json request object ideally by decoding a base64 string into a bytes object?

peak relic
inland karma
#

so the answer is yes you can

#

base64 to bytes string is a sensible solution as well

quasi shuttle
worn moth
inland karma
jagged belfry
#

Presuambly fastapi has a field post processing step you could hook into

quasi shuttle
#

nvm turns out i was using AAAA as my b64 test string which happens to be 0x0

inland karma
#

null byte moment! 😄

jagged belfry
#

Yeah

#

pydantic has EncodedBytes

quasi shuttle
#

i was using pydantic Base64Bytes and its working now

inland karma
jagged belfry
#

The web design on their docs is annoying me

#

you want to go to the reference? Are you sure you don't want to look at the tutorial?
I don't think clicking "Reference" should direct me to the tutorial

Changing versions resets you to the homepage, which is obnoxious

The types reference page has six million lines of text and a dozen entries.. and the TOC doesn't scroll

inland karma
#

thanks @jagged belfrynow it will annoy me as well... 😄 😄