Git Product home page Git Product logo

pyinquirer's Introduction

PythonInquirer

Backers on Open Collective

Sponsors on Open Collective

image

Update: We are looking for a successor/maintainance. Here: <#159> Github is starting to invite developers in from the GitHub Sponsors waitlist!

Your recommendations matter, so be sure to nominate me and other contributors of this project you'd like to see on GitHub Sponsors next by using the form in this link: http://github.co/2IHdeOw

PyInquirer is a collection of common interactive command line user interfaces.

PyInquirer 1.0.3 Bugfix Update -----------------

PyInquirer 1.0.3 <https://github.com/CITGuru/PyInquirer/releases/tag/1.0.3>

Table of Contents

  1. Documentation
    1. Installation
    2. Examples
    3. Quickstart
    4. Question Types
    5. Question Properties
    6. User Interfaces and Styles
  2. Windows Platform
  3. Support
  4. Contribution
  5. Acknowledgments
  6. License

Goal and Philosophy

PyInquirer strives to be an easily embeddable and beautiful command line interface for Python. PyInquirer wants to make it easy for existing Inquirer.js users to write immersive command line applications in Python. We are convinced that its feature-set is the most complete for building immersive CLI applications. We also hope that PyInquirer proves itself useful to Python users.

PyInquirer should ease the process of - providing error feedback - asking questions - parsing input - validating answers - managing *hierarchical prompts

Note: PyInquirer provides the user interface and the inquiry session flow. >

Documentation

Installation

Like most Python packages PyInquirer is available on PyPi. Simply use pip to install the PyInquirer package

pip install PyInquirer

In case you encounter any prompt_toolkit error, that means you've the wrong prompt_toolkit version.

You can correct that by doing

pip install prompt_toolkit==1.0.14

or download the wheel file from here:

https://pypi.org/project/prompt_toolkit/1.0.14/#files

Quickstart

Like Inquirer.js, using inquirer is structured into two simple steps:

  • you define a list of questions and hand them to prompt
  • prompt returns a list of answers
from __future__ import print_function, unicode_literals
from PyInquirer import prompt, print_json

questions = [
    {
        'type': 'input',
        'name': 'first_name',
        'message': 'What\'s your first name',
    }
]

answers = prompt(questions)
print_json(answers)  # use the answers as input for your app

A good starting point from here is probably the examples section.

Examples

Most of the examples intend to demonstrate a single question type or feature:

If you want to launch examples with the code from repository instead of installing a package you need to execute pip install -e . within project directory.

Question Types

questions is a list of questions. Each question has a type.

List - {type: 'list'}

Take type, name, message, choices[, default, filter] properties. (Note that default must be the choice index in the array or a choice value)

List prompt s ---

Raw List - {type: 'rawlist'}

Take type, name, message, choices[, default, filter] properties. (Note that default must the choice index in the array)

Raw list prompt

Raw list prompt

Expand - {type: 'expand'}

Take type, name, message, choices[, default] properties. (Note that default must be the choice index in the array. If default key not provided, then help will be used as default choice)

Note that the choices object will take an extra parameter called key for the expand prompt. This parameter must be a single (lowercased) character. The h option is added by the prompt and shouldn't be defined by the user.

See examples/expand.py for a running example.

Expand prompt closed Expand prompt expanded


Checkbox - {type: 'checkbox'}

Take type, name, message, choices[, filter, validate] properties.

Choices marked as {'checked': True} will be checked by default.

Choices whose property disabled is truthy will be unselectable. If disabled is a string, then the string will be outputted next to the disabled choice, otherwise it'll default to "Disabled". The disabled property can also be a synchronous function receiving the current answers as argument and returning a boolean or a string.

The pointer_index kwarg can be used to specify initial pointer position.

Checkbox prompt

Checkbox prompt

Confirm - {type: 'confirm'}

Take type, name, message[, default] properties. default is expected to be a boolean if used.

Confirm prompt

Confirm prompt

Input - {type: 'input'}

Take type, name, message[, default, filter, validate] properties.

Input prompt

Input prompt

Password - {type: 'password'}

Take type, name, message[, default, filter, validate] properties.

Password prompt

Password prompt

Editor - {type: 'editor'}

Take type, name, message[, default, filter, validate, eargs] properties

Editor Arguments - eargs

Opens an empty or edits the default text in the defined editor. If an editor is given (should be the full path to the executable but the regular operating system search path is used for finding the executable) it overrides the detected editor. Optionally, some environment variables can be used. If the editor is closed without changes, None is returned. In case a file is edited directly the return value is always None and save and ext are ignored.

Takes:

  • editor: accepts default to get the default platform editor. But you can also provide the path to an editor e.g vi.
  • ext: the extension to tell the editor about. This defaults to .txt but changing this might change syntax highlighting e.g ".py"
  • save: accepts True or False to determine to save a file.
  • filename: accepts the path of a file you'd like to edit.
  • env: accepts any given environment variables to pass to the editor

Launches an instance of the users preferred editor on a temporary file. Once the user exits their editor, the contents of the temporary file are read in as the result. The editor to use is determined by reading the $`VISUAL or $`EDITOR environment variables. If neither of those are present, notepad (on Windows) or vim (Linux or Mac) is used.

Question Properties

A question is a dictionary containing question related values:

  • type: (String) Type of the prompt. Defaults: input - Possible values: input, confirm, list, rawlist, expand, checkbox, password, editor
  • name: (String) The name to use when storing the answer in the answers hash. If the name contains periods, it will define a path in the answers hash.
  • message: (String|Function) The question to print. If defined as a function, the first parameter will be the current inquirer session answers.
  • default: (String|Number|Array|Function) Default value(s) to use if nothing is entered, or a function that returns the default value(s). If defined as a function, the first parameter will be the current inquirer session answers.
  • choices: (Array|Function) Choices array or a function returning a choices array. If defined as a function, the first parameter will be the current inquirer session answers. Array values can be simple strings, or objects containing a name (to display in list), a value (to save in the answers hash) and a short (to display after selection) properties. The choices array can also contain a Separator.
  • validate: (Function) Receive the user input and should return true if the value is valid, and an error message (String) otherwise. If false is returned, a default error message is provided.
  • filter: (Function) Receive the user input and return the filtered value to be used inside the program. The value returned will be added to the Answers hash.
  • when: (Function, Boolean) Receive the current user answers hash and should return true or false depending on whether or not this question should be asked. The value can also be a simple boolean.
  • pageSize: (Number) Change the number of lines that will be rendered when using list, rawList, expand or checkbox.

User Interfaces and Styles

TODO

Windows Platform

``PyInquirer`` is build on prompt_toolkit which is cross platform, and everything that you build on top should run fine on both Unix and Windows systems. On Windows, it uses a different event loop (WaitForMultipleObjects instead of select), and another input and output system. (Win32 APIs instead of pseudo-terminals and VT100.)

It's worth noting that the implementation is a "best effort of what is possible". Both Unix and Windows terminals have their limitations. But in general, the Unix experience will still be a little better.

For Windows, it's recommended to use either cmder or conemu.

Support

Most of the questions are probably related to using a question type or feature. Please lookup and study the appropriate examples.

Issue on Github TODO link

For many issues like for example common Python programming issues stackoverflow might be a good place to search for an answer. TODO link

Contribution

$ git clone [email protected]:CITGuru/PyInquirer.git
$ cd PyInquirer
$ python -m venv venv
$ source venv/bin/activate
$ pip install --upgrade pip
$ pip install -r requirements.txt
$ pip install -r requirements_dev.txt

With an environment ready you can add new feature and check everything works just fine

$ pytest -sv tests/

That's it, now you can fork a project and submit PR with your change!

Credits


Contributors

This project exists thanks to all the people who contribute!

image

Backers

Thank you to all our backers! Become a backer.

image

Sponsors

Support us by becoming a sponsor. Your logo will show up here with a link to your website. Become a sponsor.

image

License

Copyright (c) 2018 Oyetoke Toby (twitter: @oyetokeT)

Licensed under the MIT license.

pyinquirer's People

Contributors

adrabarek avatar adriandc avatar albertodonato avatar bfaulk96 avatar bmwant avatar citguru avatar djkusik avatar e3rd avatar expobrain avatar farisachugthai avatar florimondmanca avatar jonathanslenders avatar kfrncs avatar leogout avatar lichensky avatar martinthoma avatar marxsoul55 avatar monkeywithacupcake avatar myusuf5400 avatar partrita avatar philipbergen avatar piax93 avatar the-alchemist avatar timgates42 avatar tjb1982 avatar tmbo avatar vumi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pyinquirer's Issues

Default is ignored on lists

It seems that the default-key is ignored on list-type questions

Consider the following code:

from PyInquirer import prompt, print_json

answer = prompt({
        'type': 'list',
        'name': "test-question",
        'message': "Select item",
        'default': 2,
        'choices': [
            {   "name"  : "Item 1",
                "value" : "item1"   },
            {   "name"  : "Item 2",
                "value" : "item2"   },
            {   "name"  : "Item 3",
                "value" : "item3"   },
            {   "name"  : "Item 4",
                "value" : "item4"   },
        ]
    })

print_json(answer)

Expected result:

Item 3 is initially selected in the prompt

Actual result:

Item 1 is initially selected in the prompt

Environment:

OS: macOS 10.14 Mojave

$ python3 --version
Python 3.6.1
$ python3 -m pip show PyInquirer
Name: PyInquirer
Version: 1.0.2
Summary: A Python module for collection of common interactive command line user interfaces, based on Inquirer.js
Home-page: https://github.com/CITGuru/PyInquirer/
Author: Oyetoke Toby
Author-email: [email protected]
License: MIT
Location: /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages
Requires: prompt-toolkit, Pygments, regex
Required-by:

pagination for long list of options

Thank you for this wonderful library.

Was wondering if there is a way to paginate a long list of options?

Alternatively, is there a way to have the list of options printed in multiple columns so as to fit as many options in the smallest rectangular space on the console as possible?

โ“

Newline before accepting confirm input && Not displaying editor contents in output

Hi there, thanks for the awesome library!

  1. Is there an option to wait for user input for confirm type like most CLI applications? So, I would like to choose [yY/nN] and then click enter before actually registering the input.
  2. Is there an option to disable the output of the editor contents after exiting it? It just trashes the terminal screen :)
  3. Is there an option to immediately continue after exiting the editor view? It's not clear from the interaction that further new-line input is required to continue.

Thanks!

ImportError: cannot import name 'Token'

Getting following error:
Traceback (most recent call last): File "Main.py", line 2, in <module> from PyInquirer import prompt, print_json File "C:\Users\CBAY\OneDrive - Netcompany\Python Projects\TimeRegistration\venv\lib\site-packages\PyInquirer\__init__.py", line 6, in <module> from prompt_toolkit.token import Token ImportError: cannot import name 'Token'

Running on Windows 10 Enterprise both in Powershell and Cmder. Same error.

Validation doesn't work on checkboxes.

It seems to be impossible to raise a validation error on type "checkbox".

Here is the output I get when I run the "checkbox.py" example, and try to trigger "'You must choose at least one topping." error message

$ python checkbox.py
๐Ÿ˜ƒ Select toppings  done
{'toppings': []}

Going into more detail, I tried to make a set of questions with all the ways of making a validation error, all checkboxes should fail in all cases, but only the final "input" case shows an error.

from PyInquirer import style_from_dict, Token, prompt, Separator
from PyInquirer import Validator, ValidationError

class FailValidator(Validator):
	
	def validate(self, document):
		
		raise ValidationError(
			message="boogie",
			cursor_position=len(document.text)
		)

def foo(*args, **kwargs):

	raise NotImplementedError("sdfkjsdflj")

questions = [
    {
        'type': 'checkbox',
        'message': 'Select letters',
        'name': 'raise exception in function',
        'choices': [{"name":"a"}, {"name":"b"}, {"name":"c"}],
        'validate': foo,
    },
    {
        'type': 'checkbox',
        'message': 'Select letters',
        'name': 'lambda false',
        'choices': [{"name":"a"}, {"name":"b"}, {"name":"c"}],
        'validate': lambda x: False,
    },
    {
        'type': 'checkbox',
        'message': 'Select letters',
        'name': 'lambda string',
        'choices': [{"name":"a"}, {"name":"b"}, {"name":"c"}],
        'validate': lambda x: "error message",
    },
    {
        'type': 'checkbox',
        'message': 'Select letters',
        'name': 'validator validation error',
        'choices': [{"name":"a"}, {"name":"b"}, {"name":"c"}],
        'validate': FailValidator,
    },
    {
        'type': 'input',
        'name': 'text input',
        'message': 'Get an error on anything but the empty string.',
		'validate': lambda x: x == "" or "Error message",
    },
]

answers = prompt(questions)

for name, answer in answers.items():
	print(name, answer)

Returns


$ python query-cli.py
? Select letters  [a]
? Select letters  [a]
? Select letters  done
? Select letters  done (3 selections)
? Get an error on anything but the empty string.
text input
raise exception in function ['a']
validator validation error ['a', 'b', 'c']
lambda string []
lambda false ['a']

How to remove (hide) the result of prompt

Thanks for the great project now I am using it to create something cool ...

And now I am facing a problem that I can not seem to find a way to solve.

Say I have the following script:

print("begin to call inquire.list ===========>\n")	
questions = [
    {
        'type': 'list',
        'name': "name",
        'message': "message",
        'choices': ["choices1", "choices2", "choices3"]
    }
]
result = PyInquirer.prompt(questions)
print("\nresult:")	
print(result)
print("\nend to call inquire.list")	

And the final output in the terminal is

โžœ   python3 main.py
begin to call inquire.list ===========>

? message  choices2

result:
{'name': 'choices2'}

end to call inquire.list

Now what I want to achieve is after make the selection, the line of output

? message  choices2

is removed or hide (I do not what this to be shown in the terminal)

Just like during the list selection the output is

โžœ  python3 main.py
begin to call inquire.list ===========>

? message  (Use arrow keys)
 โฏ choices1
   choices2
   choices3

And after I made the choice these choices are removed from the terminal output.

I do not know if this is possible to achieve, any advice will be appreciated, thanks :)

Cancel?

How would I go about catching CTRL + C here or is there some way to cancel a action, etc once entered a input how do you exit it (etc a interactive shell)

Windows pushes content down

etc:

You find yourself in a small room, there is a door in front of you.   
? Which direction would you like to go?  (Use arrow keys)             
                                                                      
                                                                      
                                                                      
                                                                      
                                                                      
                                                                      
                                                                      
                                                                      
                                                                      
                                                                      
                                                                      
 โฏ Forward                                                            
   Right                                                              
   Left                                                               
   Back                                                               

if there already is content in the terminal it works normally.
Is there a way to fix this?

How to make a different style?

Hi there,

I see that you have a TODO in the style section.
Do you know when this would be ready?
Because I would love to experiment with styles.

BTW Awesome CLI

Loosen the version constraint of prompt_toolkitto avoid dependency

Hi, PyInquirer locked the version constraint of **prompt_toolkitto
**
as prompt_toolkitto==1.0.14, which leads to a troubling scenario that its direct downstream project [mqtt-sentinel,infraless, protomate] has to lock prompt_toolkitto.

Could you please loosen the version constraint of prompt_toolkitto?
Benefit of this is that users using both of [mqtt-sentinel,infraless, protomate] and prompt_toolkitto can upgrade their third party libraries in a timely manner to reduce technical debts.

Solution

The dependency trees of your project and affected downstream projects are shown as follows.
Taking the version constraints of upstream and downstream projects into comprehensive consideration, you can

  1. Loosen prompt_toolkitto==1.0.14 be prompt_toolkitto>=1.0.14.
  2. Loosen prompt_toolkitto==1.0.14 be prompt_toolkitto==*.
  3. Try to add an upper bound for prompt_toolkitto version constraint, according to your compatibility.

@CITGuru Please let me know your choice. I can submit a PR to fix this issue.

Thanks for your attention.
Best,
Neolith

Remove regex dependency

The regex package is only used in the /tests/ and /examples/ directories, not the actual package source directory pyinquirer/pyinquirer. However, it's called out in setup.py because it managed to sneak its way into requirements.txt. I'm guessing this should have only been in requirements_dev.txt.

Paste user input from clipboard

Is it possible to paste the user import from the clipboard for example in 'input' questions?
I've tried mouse right-click and ctrl+V but to no avail.

Add password repeat option to the password field

Maybe adding something like:

{
        'type': 'password',
        'name': 'password',
        'message': 'Your password :',
        'repeat': True,
}

Which would ask for the password again and validate if they are the same, re-ask both if not.

'KeyError' when clicking on an item in list with mouse

On MacOS, when I click with the mouse on any item of a PyInquirer list I get a KeyError thrown; this happens both in Terminal and in iTerm2.
I have looked through the source code and can't find a KeyError explicitly being thrown, so it must be inside some subroutine.

Following is an example error that happens when I click on the "Test" item:
Source code:
image
Before clicking:
image
After clicking:
image

PyInquirer\prompts\input.py", line 20 TypeError: issubclass() arg 1 must be a class

Traceback (most recent call last):
  File "main.py", line 8, in <module>
    answers = choice()
  File "C:\Users\x\choice.py", line 85, in choice
    answers = Dict(prompt(questions, style=style))
  File "D:\Program Files\Python37\lib\site-packages\PyInquirer\prompt.py", line 63, in prompt
    application = getattr(prompts, type).question(message, **_kwargs)
  File "D:\Program Files\Python37\lib\site-packages\PyInquirer\prompts\input.py", line 20, in question
    if issubclass(validate_prompt, Validator):
  File "D:\Program Files\Python37\lib\abc.py", line 143, in __subclasscheck__
    return _abc_subclasscheck(cls, subclass)
TypeError: issubclass() arg 1 must be a class

Python2 crashes with non-ascii caracters.

Hi,

When using PyInquirer with python2 I face a problem when the options include non-ascii characters.
Python3 works fine though.

Here is a minimal working example that demonstrates this behaviour.

# -*- coding: utf-8 -*-
from __future__ import print_function, unicode_literals
from PyInquirer import prompt

def main():
    choice = 'Johnโ€™s Pizza'
    questions = [
        {
            'type': 'list',
            'name': 'pizza',
            'message': 'Pizzeria:',
            'choices' : [choice]
        }
    ]
    answer = prompt(questions)
    pizza = answer['pizza']
    print('Answer is |' + pizza + '|' )

if __name__ == '__main__':
    main()

Python3 execution:

โฏ python3 encoding-test.py  
? Pizzeria:  Johnโ€™s Pizza
Answer is |Johnโ€™s Pizza|

Python2 execution:

โฏ python2 encoding-test.py
? Pizzeria:  (Use arrow keys)                                                                                                                                       
Traceback (most recent call last):
  File "encoding-test.py", line 20, in <module>
    main()
  File "encoding-test.py", line 15, in main
    answer = prompt(questions)
  File "/usr/local/lib/python2.7/dist-packages/PyInquirer/prompt.py", line 71, in prompt
    eventloop=eventloop)
  File "/usr/local/lib/python2.7/dist-packages/prompt_toolkit/shortcuts.py", line 625, in run_application
    result = cli.run()
  File "/usr/local/lib/python2.7/dist-packages/prompt_toolkit/interface.py", line 413, in run
    self._redraw()
  File "/usr/local/lib/python2.7/dist-packages/prompt_toolkit/interface.py", line 358, in _redraw
    self.renderer.render(self, self.layout, is_done=self.is_done)
  File "/usr/local/lib/python2.7/dist-packages/prompt_toolkit/renderer.py", line 429, in render
    extended_height=size.rows,
  File "/usr/local/lib/python2.7/dist-packages/prompt_toolkit/layout/containers.py", line 142, in write_to_screen
    sizes = self._divide_heigths(cli, write_position)
  File "/usr/local/lib/python2.7/dist-packages/prompt_toolkit/layout/containers.py", line 177, in _divide_heigths
    dimensions = [get_dimension_for_child(c, index) for index, c in enumerate(self.children)]
  File "/usr/local/lib/python2.7/dist-packages/prompt_toolkit/layout/containers.py", line 175, in get_dimension_for_child
    return c.preferred_height(cli, write_position.width, write_position.extended_height)
  File "/usr/local/lib/python2.7/dist-packages/prompt_toolkit/layout/containers.py", line 1652, in preferred_height
    return self.content.preferred_height(cli, width, max_available_height)
  File "/usr/local/lib/python2.7/dist-packages/prompt_toolkit/layout/containers.py", line 1000, in preferred_height
    cli, width - total_margin_width, max_available_height, wrap_lines),
  File "/usr/local/lib/python2.7/dist-packages/prompt_toolkit/layout/controls.py", line 254, in preferred_height
    content = self.create_content(cli, width, None)
  File "/usr/local/lib/python2.7/dist-packages/prompt_toolkit/layout/controls.py", line 259, in create_content
    tokens_with_mouse_handlers = self._get_tokens_cached(cli)
  File "/usr/local/lib/python2.7/dist-packages/prompt_toolkit/layout/controls.py", line 239, in _get_tokens_cached
    cli.render_counter, lambda: self.get_tokens(cli))
  File "/usr/local/lib/python2.7/dist-packages/prompt_toolkit/cache.py", line 37, in get
    value = getter_func()
  File "/usr/local/lib/python2.7/dist-packages/prompt_toolkit/layout/controls.py", line 239, in <lambda>
    cli.render_counter, lambda: self.get_tokens(cli))
  File "/usr/local/lib/python2.7/dist-packages/PyInquirer/prompts/list.py", line 98, in _get_choice_tokens
    append(i, choice)
  File "/usr/local/lib/python2.7/dist-packages/PyInquirer/prompts/list.py", line 92, in append
    tokens.append((T.Selected if selected else T, str(choice[0]),
UnicodeEncodeError: 'ascii' codec can't encode character u'\u2019' in position 4: ordinal not in range(128)

The apostrophe unicode character is what is breaking the python2 execution.

Checkbox: disable choices based on answers

I am trying to address a use-case where let's say I have a checkbox with 5 options. If I select option 1 then options 2 through 5 should be disabled. Similary, if I unselect option 2 then options 2 to 5 should be enabled again.

Is this possible with the current state of the implementation?

List: Rendering issue

List type renders in the middle of the screen aligned to the left, rather than immediately below the prompt.

screen shot 2018-11-07 at 12 38 32 pm

screen shot 2018-11-07 at 12 37 29 pm

Question based on previous answer

This maybe is kind of the same question as #22

I would like to have like

questions = [
    {
        'type': 'list',
        'name': 'project',
        'message': 'QUESTION A',
        'choices': ['A', 'B', 'C']
    },
    {
        'type': 'input',
        'name': 'ask',
        'message': 'Why did you choose {}?'.format(AnswerToTheFirstQuestion)
    },
]

answers = prompt(questions, style=style)

Is there any function I can use to get the value of the previous question?

Thank you!

Update message based on current choices in checkbox

In the Pizza example, it makes sense to update the message with something like the cost.

The questions array basically needs message_update function similar to the validate function and this will just update the message based on that.

Require the user to press Enter for confirm type

One thing that bothers me about this implementation of inquirer is how pressing y/n jumps immediately to the next prompt. I think for the last X decades we've been conditioned to type y/n and then hit enter. Can this be changed?

I think all it needs is to make changes to confirm.py by changing these decorators

@manager.registry.add_binding('y')
@manager.registry.add_binding('Y')

on lines 66,67 to

@manager.registry.add_binding('y', 'Enter')
@manager.registry.add_binding('Y', 'Enter')

And same for the No prompts on lines 60,61.

Can't use "message" as a function(answers: dict) -> str

The documentation says that the "message" attribute of a question can be a string or a function that takes the current answers and returns a string. That doesn't appear to be accurate documentation as any function, or lambda, I use as a questions "message" gets evaluated as a string in the prompt.

e.g. This question definition;

def my_message(answers):
    return "Hello {x}".format(x=len(answers))

questions = [
    dict(
        type="list",
        name="answer",
        message=my_message,
        choices=[dict(name=x) for x in "foo bar baz".split()],
]

... renders like so;

? <function get_questions.<locals>.my_message at 0x7ff19399d158>  (Use arrow keys)
 โฏ foo
   bar
   baz

Originally posted by @AndrewOwenMartin in #39 (comment)

Refactoring/redesign is needed to let more cli extensions

I started using this library for an internal project at work (a cli to generate python code base).

below a list of features I could add it here:

  • Add jinja2, to include answers in later questions.
  • Looping over a list of questions and return a list of answers.
  • Conditional statements, Show or hide questions based on previous question' answers

Using a seperate list for choices?

Say I have a list that's user created, or I'm storing options for restoring save points in my program, I need keys that can be displayed.

Something like:
list = [Key1, Key2 ,Key3 ,Key4 ,Key5]
questions = [
{
'type': 'list',
'name': 'saves',
'message': "What save would you like to load?",
'choices': list
}
]

This looks awesome!

Just wanted to stop by and say this library looks really great, thanks for sharing it! I'm looking forward to digging in more. I've read bits and pieces of the code, haven't written anything myself with it (yet). But I'm really excited to build something. Just reading helped me discover the prompt_toolkit library you're using behind the scenes and that seems like it provides a lot of capabilities and is partly why this library is so promising.

Disabled options that are first in a choice list are selectable initially, when they should not be.

Here's a minimal demo of the bug.

from PyInquirer import prompt, style_from_dict, Token, Separator


custom_style_2 = style_from_dict({
    Token.Separator: '#6C6C6C',
    Token.QuestionMark: '#FF9D00 bold',
    # Token.Selected: '',  # default
    Token.Selected: '#5F819D',
    Token.Pointer: '#FF9D00 bold',
    Token.Instruction: '',  # default
    Token.Answer: '#5F819D bold',
    Token.Question: '',
})


def buggy_prompt():
    choices = [
        Separator(),
		# This should not be selectable, but it is.
        {
             'name': 'Attach to existing tmux session',
             'disabled': 'Select one below.'
        },
        "Should be first choice."
    ]

    questions = [
        {
            'type': 'list',
            'name': 'action',
            'message': 'What do you want to do?',
            'choices': choices
        },
    ]

    answers = prompt(questions, style=custom_style_2)
    print(answers)
    return None

def main():
    buggy_prompt()


if __name__ == "__main__":
    main()

image

My guess is that some logic to check if the first choice in the list is "disabled" when placing the selection cursor would fix this. The bug is somewhere in this file: https://github.com/CITGuru/PyInquirer/blob/master/PyInquirer/prompts/list.py

Allow choice of Pointer

For the list/checkbox types, the pointer is the unicode character U+276F. Windows command prompt seems to have an issue with displaying that character (see screenshot). Note: Notepad displays the symbol correctly using the same font, so it's not an issue with the font. Would be nice if we could choose the pointer symbol too, just like we can choose the 'qmark' symbol. Thanks.

capture2

Creating Checkboxes From For Loop

My code has a text file and the text file is editable, so I don't know the contents of it in real world but I need to have a multiselect (checkbox) feature. So the thing I'm trying to do is iterate over all items and make a multiselect list. I have the other parts, can I do something like this. If yes, how? Also I can use lists to create it.
Thanks.

and I know that this is not an full issue but I don't have a better place to ask :(

@CITGuru idk does it affect but added you just in case

default type doesn't work

Hi all,

The README claims that 'type' key is optional for questions; it appear this statement is not true:
Running with a list of questions of this form:

questions = [
    {                                                                                              
        'type': 'input',
        'name': 'NAME',
        'message': 'Name:'
     },                                                                                           
    {
        'name': 'ASV',
        'message': 'ASV:'
     }
]

answers = prompt(questions)

leads to this interaction

? Name:  qwe
Traceback (most recent call last):
  File "./work.py", line 63, in <module>
    answers = prompt(questions)
  File "/usr/local/lib/python2.7/site-packages/PyInquirer/prompt.py", line 27, in prompt
    raise PromptParameterException('type')
PyInquirer.PromptParameterException: ('You must provide a `type` value', None)

Offering to join as maintainers

Hey there,
as already stated in the whaaaaat issue, I am part of a small company building one of our internal CLIs on top of whaaaaat, which has not been maintained well for the past couple of months. As this piece of software is particularly mission critical, we'd like to propose that @daniel-k and I join the group of maintainers to push development, quickly review PRs and maybe set up a continuous delivery pipeline to automatically push to pypi. Would be honored to join ๐Ÿ‘

Best,
Deniz

'short' key is not used in choice dictionaries

Howdy,

Loving the module; it's super helpful to have an easy-to-use question interface for building tooling scripts. I did notice that despite the README that mentions the 'short' value should be displayed after a choice is made in a checkbox or list inquiry, but it looks like it's not actually used.

It'd be great to add that in. In some cases I want to display a fair amount of contextual information when the user is making a selection, but printing those post-selection is a bit too verbose. I'm a bit swamped right now, so if you've got the bandwidth/desire it'd be nice to get that fixed, but once I'm out of the woods I can certainly whip up a PR

Either way, thanks for making this module and making it available to everyone!

Can't install

When i try to install via the command:

$ pip3 install pyInquirer

i get this output.

I tried it on a AWS EC2 machine and on my local Linux Mint distro. I trieded with an without venv.

WARNING: The directory '/home/diego/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
WARNING: The directory '/home/diego/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Collecting pyInquirer
Downloading https://files.pythonhosted.org/packages/fb/4c/434b7c454010a284b49d6f1d446fe8dc5960415613d8c0225b9e2efb6724/PyInquirer-1.0.3.tar.gz
Collecting prompt_toolkit==1.0.14 (from pyInquirer)
Downloading https://files.pythonhosted.org/packages/ee/3d/b25d35a9f0d381dd1c02d8e04b37c353caaaff4bc32150328eeebe4931f5/prompt_toolkit-1.0.14-py3-none-any.whl (248kB)
|################################| 256kB 2.4MB/s
Collecting Pygments>=2.2.0 (from pyInquirer)
Downloading https://files.pythonhosted.org/packages/5c/73/1dfa428150e3ccb0fa3e68db406e5be48698f2a979ccbcec795f28f44048/Pygments-2.4.2-py2.py3-none-any.whl (883kB)
|################################| 890kB 8.8MB/s
Collecting regex>=2016.11.21 (from pyInquirer)
Downloading https://files.pythonhosted.org/packages/6f/4e/1b178c38c9a1a184288f72065a65ca01f3154df43c6ad898624149b8b4e0/regex-2019.06.08.tar.gz (651kB)
|################################| 655kB 7.4MB/s
Requirement already satisfied: six>=1.9.0 in /usr/local/lib/python3.6/dist-packages (from prompt_toolkit==1.0.14->pyInquirer) (1.12.0)
Collecting wcwidth (from prompt_toolkit==1.0.14->pyInquirer)
Downloading https://files.pythonhosted.org/packages/7e/9f/526a6947247599b084ee5232e4f9190a38f398d7300d866af3ab571a5bfe/wcwidth-0.1.7-py2.py3-none-any.whl
Building wheels for collected packages: pyInquirer, regex
Building wheel for pyInquirer (setup.py) ... done
Stored in directory: /home/diego/.cache/pip/wheels/52/6c/b1/3e4b0e8daf42a92883c7641c0ea8ffb62e0490ebed2faa55ad
Building wheel for regex (setup.py) ... error
ERROR: Complete output from command /usr/bin/python3 -u -c 'import setuptools, tokenize;file='"'"'/tmp/pip-install-v63o8y01/regex/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-i3ad1518 --python-tag cp36:
ERROR: BASE_DIR is /tmp/pip-install-v63o8y01/regex
/usr/local/lib/python3.6/dist-packages/setuptools/dist.py:475: UserWarning: Normalizing '2019.06.08' to '2019.6.8'
normalized_version,
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.6
creating build/lib.linux-x86_64-3.6/regex
copying regex_3/regex/init.py -> build/lib.linux-x86_64-3.6/regex
copying regex_3/regex/regex.py -> build/lib.linux-x86_64-3.6/regex
copying regex_3/regex/_regex_core.py -> build/lib.linux-x86_64-3.6/regex
creating build/lib.linux-x86_64-3.6/regex/test
copying regex_3/regex/test/init.py -> build/lib.linux-x86_64-3.6/regex/test
copying regex_3/regex/test/test_regex.py -> build/lib.linux-x86_64-3.6/regex/test
running build_ext
building 'regex._regex' extension
creating build/temp.linux-x86_64-3.6
creating build/temp.linux-x86_64-3.6/regex_3
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.6m -c regex_3/_regex.c -o build/temp.linux-x86_64-3.6/regex_3/_regex.o
regex_3/_regex.c:48:10: fatal error: Python.h: No such file or directory
#include "Python.h"
^~~~~~~~~~
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

ERROR: Failed building wheel for regex
Running setup.py clean for regex
Successfully built pyInquirer
Failed to build regex
Installing collected packages: wcwidth, prompt-toolkit, Pygments, regex, pyInquirer
Running setup.py install for regex ... error
ERROR: Complete output from command /usr/bin/python3 -u -c 'import setuptools, tokenize;file='"'"'/tmp/pip-install-v63o8y01/regex/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /tmp/pip-record-y3f_y9gi/install-record.txt --single-version-externally-managed --compile:
ERROR: BASE_DIR is /tmp/pip-install-v63o8y01/regex
/usr/local/lib/python3.6/dist-packages/setuptools/dist.py:475: UserWarning: Normalizing '2019.06.08' to '2019.6.8'
normalized_version,
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.6
creating build/lib.linux-x86_64-3.6/regex
copying regex_3/regex/init.py -> build/lib.linux-x86_64-3.6/regex
copying regex_3/regex/regex.py -> build/lib.linux-x86_64-3.6/regex
copying regex_3/regex/_regex_core.py -> build/lib.linux-x86_64-3.6/regex
creating build/lib.linux-x86_64-3.6/regex/test
copying regex_3/regex/test/init.py -> build/lib.linux-x86_64-3.6/regex/test
copying regex_3/regex/test/test_regex.py -> build/lib.linux-x86_64-3.6/regex/test
running build_ext
building 'regex._regex' extension
creating build/temp.linux-x86_64-3.6
creating build/temp.linux-x86_64-3.6/regex_3
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.6m -c regex_3/_regex.c -o build/temp.linux-x86_64-3.6/regex_3/_regex.o
regex_3/_regex.c:48:10: fatal error: Python.h: No such file or directory
#include "Python.h"
^~~~~~~~~~
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
ERROR: Command "/usr/bin/python3 -u -c 'import setuptools, tokenize;file='"'"'/tmp/pip-install-v63o8y01/regex/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /tmp/pip-record-y3f_y9gi/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-install-v63o8y01/regex/

Editor example does not work

PyInquirer/examples/editor.py
does not work :(

(newcli-dev) โžœ  ~ python cli.py
Traceback (most recent call last):
  File "cli.py", line 27, in <module>
    answers = prompt(questions, style=custom_style_2)
  File "/Users/igor/PythonEnvs/newcli-dev/lib/python3.7/site-packages/PyInquirer/prompt.py", line 67, in prompt
    application = getattr(prompts, type).question(message, **_kwargs)
  File "/Users/igor/PythonEnvs/newcli-dev/lib/python3.7/site-packages/PyInquirer/prompts/editor.py", line 139, in question
    if issubclass(validate_prompt, Validator):
  File "/Users/igor/PythonEnvs/newcli-dev/bin/../lib/python3.7/abc.py", line 143, in __subclasscheck__
    return _abc_subclasscheck(cls, subclass)
TypeError: issubclass() arg 1 must be a class

Python 3.7.1
PyInquirer==1.0.3

Custom validator with class attribute

Hello, I'm trying to write a custom validator using a class. The problem is that I need to compare the value in the validate() method with an attribute of the class. I tried with this:
`class MyValidator(Validator):
def init(self, limit):
self.limit = limit
Validator.init(self)

def validate(self, number):
if number > limit:
return "Error!"
else:
return True`

The problem is that validate() method seems to be never called with this approach. If I remove the constructor from MyValidator, it works but I don't have the "limit" attribute. Is there a solution for this? Thank you

Setting default causes exception on rawlists

Using the default-key causes an exception when used on a rawlist

Consider the following code:

from PyInquirer import prompt, print_json

answer = prompt([{
        'type': 'rawlist',
        'name': "test-question",
        'message': "Select item",
        'default': 2,
        'choices': [
            {   "name"  : "Item 1",
                "value" : "item1"   },
            {   "name"  : "Item 2",
                "value" : "item2"   },
            {   "name"  : "Item 3",
                "value" : "item3"   },
            {   "name"  : "Item 4",
                "value" : "item4"   },
        ]
    }])

print_json(answer)

Expected result:

Item 3 is initially selected in the prompt

Actual result:

? Select item
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/prompt_toolkit/cache.py", line 34, in get
    return self._data[key]
KeyError: 1

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "./scripts/test.py", line 20, in <module>
    question
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/PyInquirer/prompt.py", line 71, in prompt
    eventloop=eventloop)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/prompt_toolkit/shortcuts.py", line 625, in run_application
    result = cli.run()
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/prompt_toolkit/interface.py", line 413, in run
    self._redraw()
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/prompt_toolkit/interface.py", line 358, in _redraw
    self.renderer.render(self, self.layout, is_done=self.is_done)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/prompt_toolkit/renderer.py", line 429, in render
    extended_height=size.rows,
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/prompt_toolkit/layout/containers.py", line 142, in write_to_screen
    sizes = self._divide_heigths(cli, write_position)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/prompt_toolkit/layout/containers.py", line 177, in _divide_heigths
    dimensions = [get_dimension_for_child(c, index) for index, c in enumerate(self.children)]
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/prompt_toolkit/layout/containers.py", line 177, in <listcomp>
    dimensions = [get_dimension_for_child(c, index) for index, c in enumerate(self.children)]
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/prompt_toolkit/layout/containers.py", line 175, in get_dimension_for_child
    return c.preferred_height(cli, write_position.width, write_position.extended_height)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/prompt_toolkit/layout/containers.py", line 1652, in preferred_height
    return self.content.preferred_height(cli, width, max_available_height)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/prompt_toolkit/layout/containers.py", line 1000, in preferred_height
    cli, width - total_margin_width, max_available_height, wrap_lines),
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/prompt_toolkit/layout/controls.py", line 254, in preferred_height
    content = self.create_content(cli, width, None)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/prompt_toolkit/layout/controls.py", line 259, in create_content
    tokens_with_mouse_handlers = self._get_tokens_cached(cli)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/prompt_toolkit/layout/controls.py", line 239, in _get_tokens_cached
    cli.render_counter, lambda: self.get_tokens(cli))
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/prompt_toolkit/cache.py", line 37, in get
    value = getter_func()
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/prompt_toolkit/layout/controls.py", line 239, in <lambda>
    cli.render_counter, lambda: self.get_tokens(cli))
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/PyInquirer/prompts/rawlist.py", line 89, in _get_choice_tokens
    tokens.append((T, '  Answer: %d' % self.choices[self.pointer_index][0]))
IndexError: list index out of range

Environment:

OS: macOS 10.14 Mojave

$ python3 --version
Python 3.6.1
$ python3 -m pip show PyInquirer
Name: PyInquirer
Version: 1.0.2
Summary: A Python module for collection of common interactive command line user interfaces, based on Inquirer.js
Home-page: https://github.com/CITGuru/PyInquirer/
Author: Oyetoke Toby
Author-email: [email protected]
License: MIT
Location: /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages
Requires: prompt-toolkit, Pygments, regex
Required-by:

`"checked": True` only works when all of the choices are `"checked": True`

For something like this:

{
    "type": "checkbox",
    "name": "items",
    "message": "Select items",
    "choices": get_choices(app_state, items),
}

where choices is made up of a list such as

def get_choices(app_state, items):
    return [
        {
            "name": "<item name=\"{}\" created=\"{}\">".format(x["name"], x["created"]),
            "value": x["name"],
            "checked": x["name"] in app_state["collections"],
        } for x in items
    ]

If checked is False for any of the choices, it displays all of the choices as if they were "checked": False, unless the value entry is removed and the name entry is x["name"].

AssertionError

Traceback (most recent call last):
  File "/data/Python/pyinquirertest.py", line 46, in <module>
    answers = prompt(questions, style=custom_style_2)
  File "/usr/lib/python3.7/site-packages/PyInquirer/prompt.py", line 75, in prompt
    eventloop=eventloop)
  File "/usr/lib/python3.7/site-packages/prompt_toolkit/shortcuts.py", line 576, in run_application
    output=create_output(true_color=true_color))
  File "/usr/lib/python3.7/site-packages/prompt_toolkit/shortcuts.py", line 126, in create_output
    ansi_colors_only=ansi_colors_only, term=term)
  File "/usr/lib/python3.7/site-packages/prompt_toolkit/terminal/vt100_output.py", line 424, in from_pty
    assert stdout.isatty()
AssertionError

For whatever reason I keep getting this error whenever I try to run a script. I'm fairly new to programming and python, so forgive me if this is a newbie error. I have run numerous examples that were provided, and I can't get any of them to work.

As a reference here is the latest code I tried to write that threw the error above. I am currently running Python 3.7.2.


# -*- coding: utf-8 -*-
"""
* Input prompt example
* run example by writing `python example/input.py` in your console
"""
from __future__ import print_function, unicode_literals
import regex
from pprint import pprint

from PyInquirer import style_from_dict, Token, prompt
from PyInquirer import Validator, ValidationError

from examples import custom_style_2


class PhoneNumberValidator(Validator):
    def validate(self, document):
        ok = regex.match('^([01]{1})?[-.\s]?\(?(\d{3})\)?[-.\s]?(\d{3})[-.\s]?(\d{4})\s?((?:#|ext\.?\s?|x\.?\s?){1}(?:\d+)?)?$', document.text)
        if not ok:
            raise ValidationError(
                message='Please enter a valid phone number',
                cursor_position=len(document.text))  # Move cursor to end


questions = [
    {
        'type': 'input',
        'name': 'first_name',
        'message': 'What\'s your first name',
    },
    {
        'type': 'input',
        'name': 'last_name',
        'message': 'What\'s your last name',
        'default': lambda answers: 'Smith' if answers['first_name'] == 'Dave' else 'Doe',
        'validate': lambda val: val == 'Doe' or 'is your last name Doe?'
    },
    {
        'type': 'input',
        'name': 'phone',
        'message': 'What\'s your phone number',
        'validate': PhoneNumberValidator
    }
]

answers = prompt(questions, style=custom_style_2)
pprint(answers)

Any help would be greatly appreciated.

Thank you,
Sean

prompts/checkbox please make "mouse_support" variable.

Hi there

in the libary "prompt_toolkit" wich is used, the variable "mouse_support" is changeable calling function prompt(.., mouse_support=False)
in file ./prompts/checkbox.py the option is hard coded on TRUE.
Is is possible to set this option with an argument?

printing question on several lines

if the type of a question is input, long question is printed on several lines, however if the type is confirm, long question is printed on one line and appears to be cut by terminal window

Allow default selection in list

It's an amazing library!

Can you also add 'default selection' for list?
Right now the first element is selected by default on initialization.
I have an unending loop through which each choice is selected and an action is performed. It would make sense to keep the selection on the last choice, instead of resetting it back to the first element.

It also seems to be on #TODO list,

default = kwargs.pop('default', 0)  # TODO

Related - #17

Localization

Hi! I'd like to use PyInquirer for some scripts which should be in German.
It would be great if there was a configuration option to change the messages and accepted inputs (for example [Y/n] becomes [J/n] and accepts Ja and Nein).
I think I could help with that if its interesting for you.

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.