Coder Social home page Coder Social logo

Comments (6)

chobeat avatar chobeat commented on May 18, 2024

Like a fake.identity() that returns a Profile object with all those fields (generated using existing functions)?

Can i work on it?

from faker.

joseph-norman avatar joseph-norman commented on May 18, 2024

Perhaps fake.profile() with optional args for extra fields? Good site btw.

from faker.

chobeat avatar chobeat commented on May 18, 2024

@joseph-norman i think it would be more useful and intuitive to generate all fields by the default and have an optional list of field names to limit the generation to those fields only.

from faker.

jabbalaci avatar jabbalaci commented on May 18, 2024

The generated output could be a dictionary IMO. I think we can generate all the fields, after all this generation is not a time consuming process. If someone needs less fields, (s)he can select them from the dictionary.

Please leave the possibility open for improvements. Keep in my mind that not everyone is from the US. Gender, name set and country should be optional parameters:

def profile(gender='random', name_set='American', country='US'):
    # just an example but you get the idea

That is, if I want to generate non-US data, I should be able to do that. For the moment we can do it with US data, but leave the door open for future improvements.

from faker.

chobeat avatar chobeat commented on May 18, 2024

@jabbalaci look at the first commit i did. Anyway i forgot about the locale, you're right. I will try to design a consistent API and keep it intuitive for both US and non-US users.

from faker.

fcurella avatar fcurella commented on May 18, 2024

closing for inactivity. Feel free to reopen

from faker.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.