Skip to content

examples to use other generator? #12

@hyusetiawan

Description

@hyusetiawan

Is there an example on how to use cuid2 or nanoid?
My assumption was passing a function that would return a generated id string would suffice but i keep getting weird errors, for ex:
using cuid2:

ValueError: Could not find function cuid in cuid2.generator.
ValueError: Cannot serialize: <cuid2.generator.Cuid object at 0x1030071d0>
using nanoid:
default=nanoid.generate.generate, ^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'function' object has no attribute 'generate'

Sub-issues

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions