Skip to content

Commit 3943925

Browse files
committed
Merge develop -> asyncio
2 parents bbd3137 + bb246f9 commit 3943925

File tree

262 files changed

+3452
-2671
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

262 files changed

+3452
-2671
lines changed

.github/CODE_OF_CONDUCT.md

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
5+
In the interest of fostering an open and welcoming environment, we as
6+
contributors and maintainers pledge to making participation in our project and
7+
our community a harassment-free experience for everyone, regardless of age, body
8+
size, disability, ethnicity, sex characteristics, gender identity and expression,
9+
level of experience, education, socio-economic status, nationality, personal
10+
appearance, race, religion, or sexual identity and orientation.
11+
12+
## Our Standards
13+
14+
Examples of behavior that contributes to creating a positive environment
15+
include:
16+
17+
* Using welcoming and inclusive language
18+
* Being respectful of differing viewpoints and experiences
19+
* Gracefully accepting constructive criticism
20+
* Focusing on what is best for the community
21+
* Showing empathy towards other community members
22+
23+
Examples of unacceptable behavior by participants include:
24+
25+
* The use of sexualized language or imagery and unwelcome sexual attention or
26+
advances
27+
* Trolling, insulting/derogatory comments, and personal or political attacks
28+
* Public or private harassment
29+
* Publishing others' private information, such as a physical or electronic
30+
address, without explicit permission
31+
* Other conduct which could reasonably be considered inappropriate in a
32+
professional setting
33+
34+
## Our Responsibilities
35+
36+
Project maintainers are responsible for clarifying the standards of acceptable
37+
behavior and are expected to take appropriate and fair corrective action in
38+
response to any instances of unacceptable behavior.
39+
40+
Project maintainers have the right and responsibility to remove, edit, or
41+
reject comments, commits, code, wiki edits, issues, and other contributions
42+
that are not aligned to this Code of Conduct, or to ban temporarily or
43+
permanently any contributor for other behaviors that they deem inappropriate,
44+
threatening, offensive, or harmful.
45+
46+
## Scope
47+
48+
This Code of Conduct applies both within project spaces and in public spaces
49+
when an individual is representing the project or its community. Examples of
50+
representing a project or community include using an official project e-mail
51+
address, posting via an official social media account, or acting as an appointed
52+
representative at an online or offline event. Representation of a project may be
53+
further defined and clarified by project maintainers.
54+
55+
## Enforcement
56+
57+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
58+
reported by contacting the project team at dan@pyrogram.org. All
59+
complaints will be reviewed and investigated and will result in a response that
60+
is deemed necessary and appropriate to the circumstances. The project team is
61+
obligated to maintain confidentiality with regard to the reporter of an incident.
62+
Further details of specific enforcement policies may be posted separately.
63+
64+
Project maintainers who do not follow or enforce the Code of Conduct in good
65+
faith may face temporary or permanent repercussions as determined by other
66+
members of the project's leadership.
67+
68+
## Attribution
69+
70+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71+
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
72+
73+
[homepage]: https://www.contributor-covenant.org
74+
75+
For answers to common questions about this code of conduct, see
76+
https://www.contributor-covenant.org/faq

.github/CONTRIBUTING.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# How to Contribute
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
---
2+
name: Bug Report
3+
about: Create a bug report affecting the library
4+
labels: "bug"
5+
---
6+
7+
<!-- WARNING: Ignoring this template will lead to the issue being closed as incomplete -->
8+
9+
## Checklist
10+
- [ ] I am sure the error is coming from Pyrogram's code and not elsewhere.
11+
- [ ] I have searched in the issue tracker for similar bug reports, including closed ones.
12+
- [ ] I ran `pip3 install -U https://github.com/pyrogram/pyrogram/archive/develop.zip` and reproduced the issue using the latest development version.
13+
14+
## Description
15+
A clear and concise description of the problem.
16+
17+
## Steps to Reproduce
18+
[A minimal, complete and verifiable example](https://stackoverflow.com/help/mcve).
19+
20+
## Traceback
21+
The full traceback (if applicable).
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
name: Feature Request
3+
about: Suggest ideas, new features or enhancements
4+
labels: "enhancement"
5+
---
6+
7+
<!-- WARNING: Ignoring this template will lead to the issue being closed as incomplete -->
8+
9+
## Checklist
10+
- [ ] I believe the idea is awesome and would benefit the library.
11+
- [ ] I have searched in the issue tracker for similar requests, including closed ones.
12+
13+
## Description
14+
A detailed description of the request.

.github/ISSUE_TEMPLATE/question.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
name: Ask Question
3+
about: Ask a Pyrogram related question
4+
title: For Q&A purposes, please read this template body
5+
labels: "question"
6+
---
7+
8+
<!-- WARNING: Ignoring this template will lead to the issue being closed as incomplete -->
9+
10+
# Important
11+
This place is for issues about Pyrogram, it's **not a forum**.
12+
13+
If you'd like to post a question, please move to https://stackoverflow.com or join the Telegram community by following the description in https://t.me/pyrogram.
14+
15+
Thanks.

MANIFEST.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
## Include
2-
include COPYING COPYING.lesser NOTICE requirements.txt
2+
include README.md COPYING COPYING.lesser NOTICE requirements.txt
33
recursive-include compiler *.py *.tl *.tsv *.txt
44
recursive-include pyrogram mime.types
55

README.md

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
<p align="center">
2+
<a href="https://github.com/pyrogram/pyrogram">
3+
<img src="https://i.imgur.com/BOgY9ai.png" alt="Pyrogram">
4+
</a>
5+
<br>
6+
<b>Telegram MTProto API Framework for Python</b>
7+
<br>
8+
<a href="https://docs.pyrogram.org">
9+
Documentation
10+
</a>
11+
12+
<a href="https://github.com/pyrogram/pyrogram/releases">
13+
Releases
14+
</a>
15+
16+
<a href="https://t.me/Pyrogram">
17+
Community
18+
</a>
19+
</p>
20+
21+
## Pyrogram
22+
23+
``` python
24+
from pyrogram import Client, Filters
25+
26+
app = Client("my_account")
27+
28+
29+
@app.on_message(Filters.private)
30+
def hello(client, message):
31+
message.reply("Hello {}".format(message.from_user.first_name))
32+
33+
34+
app.run()
35+
```
36+
37+
**Pyrogram** is an elegant, easy-to-use [Telegram](https://telegram.org/) client library and framework written from the
38+
ground up in Python and C. It enables you to easily create custom apps for both user and bot identities (bot API alternative) via the [MTProto API](https://core.telegram.org/api#telegram-api).
39+
40+
> [Pyrogram in fully-asynchronous mode is also available »](https://github.com/pyrogram/pyrogram/issues/181)
41+
>
42+
> [Working PoC of Telegram voice calls using Pyrogram »](https://github.com/bakatrouble/pytgvoip)
43+
44+
### Features
45+
46+
- **Easy**: You can install Pyrogram with pip and start building your applications right away.
47+
- **Elegant**: Low-level details are abstracted and re-presented in a much nicer and easier way.
48+
- **Fast**: Crypto parts are boosted up by [TgCrypto](https://github.com/pyrogram/tgcrypto), a high-performance library
49+
written in pure C.
50+
- **Documented**: Pyrogram API methods, types and public interfaces are well documented.
51+
- **Type-hinted**: Exposed Pyrogram types and method parameters are all type-hinted.
52+
- **Updated**, to make use of the latest Telegram API version and features.
53+
- **Bot API-like**: Similar to the Bot API in its simplicity, but much more powerful and detailed.
54+
- **Pluggable**: The Smart Plugin system allows to write components with minimal boilerplate code.
55+
- **Comprehensive**: Execute any advanced action an official client is able to do, and even more.
56+
57+
### Requirements
58+
59+
- Python 3.4 or higher.
60+
- A [Telegram API key](https://docs.pyrogram.org/intro/setup#api-keys).
61+
62+
### Installing
63+
64+
``` bash
65+
pip3 install pyrogram
66+
```
67+
68+
### Resources
69+
70+
- The Docs contain lots of resources to help you getting started with Pyrogram: https://docs.pyrogram.org.
71+
- Reading [Examples in this repository](https://github.com/pyrogram/pyrogram/tree/master/examples) is also a good way
72+
for learning how Pyrogram works.
73+
- Seeking extra help? Don't be shy, come join and ask our [Community](https://t.me/PyrogramChat)!
74+
- For other requests you can send an [Email](mailto:dan@pyrogram.org) or a [Message](https://t.me/haskell).
75+
76+
### Contributing
77+
78+
Pyrogram is brand new, and **you are welcome to try it and help make it even better** by either submitting pull
79+
requests or reporting issues/bugs as well as suggesting best practices, ideas, enhancements on both code
80+
and documentation. Any help is appreciated!
81+
82+
### Copyright & License
83+
84+
- Copyright (C) 2017-2019 Dan Tès <<https://github.com/delivrance>>
85+
- Licensed under the terms of the [GNU Lesser General Public License v3 or later (LGPLv3+)](COPYING.lesser)

README.rst

Lines changed: 0 additions & 131 deletions
This file was deleted.

compiler/api/compiler.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -328,15 +328,15 @@ def start():
328328
)
329329

330330
if docstring_args:
331-
docstring_args = "Args:\n " + "\n ".join(docstring_args)
331+
docstring_args = "Parameters:\n " + "\n ".join(docstring_args)
332332
else:
333333
docstring_args = "No parameters required."
334334

335335
docstring_args = "Attributes:\n ID: ``{}``\n\n ".format(c.id) + docstring_args
336336

337337
if c.section == "functions":
338-
docstring_args += "\n\n Raises:\n :obj:`RPCError <pyrogram.RPCError>`"
339338
docstring_args += "\n\n Returns:\n " + get_docstring_arg_type(c.return_type)
339+
340340
else:
341341
references = get_references(".".join(filter(None, [c.namespace, c.name])))
342342

@@ -462,7 +462,7 @@ def start():
462462
["{0}={0}".format(i[0]) for i in sorted_args if i != ("flags", "#")]
463463
),
464464
slots=", ".join(['"{}"'.format(i[0]) for i in sorted_args if i != ("flags", "#")]),
465-
qualname="{}{}".format("{}.".format(c.namespace) if c.namespace else "", c.name)
465+
qualname="{}.{}{}".format(c.section, "{}.".format(c.namespace) if c.namespace else "", c.name)
466466
)
467467
)
468468

0 commit comments

Comments
 (0)