Twitter API Access Token
access_token_secret: str
Twitter API Access Token Secret
- max_retries: Optional[int]
+ max_retries: int | None
Number of times to attempt to (re)connect the stream.
- proxy: Optional[str]
+ proxy: str | None
Proxy URL
Attributes
----------
- session : Optional[aiohttp.ClientSession]
+ session : aiohttp.ClientSession | None
Aiohttp client session used to connect to the API
- task : Optional[asyncio.Task]
+ task : asyncio.Task | None
The task running the stream
user_agent : str
User agent used when connecting to the API
Parameters
----------
- follow: Optional[list[int | str]]
+ follow: list[int | str] | None
A list of user IDs, indicating the users to return statuses for in
the stream. See https://developer.twitter.com/en/docs/twitter-api/v1/tweets/filter-realtime/guides/basic-stream-parameters
for more information.
- track: Optional[list[str]]
+ track: list[str] | None
Keywords to track. Phrases of keywords are specified by a list. See
https://developer.twitter.com/en/docs/tweets/filter-realtime/guides/basic-stream-parameters
for more information.
- locations: Optional[list[float]]
+ locations: list[float] | None
Specifies a set of bounding boxes to track. See
https://developer.twitter.com/en/docs/tweets/filter-realtime/guides/basic-stream-parameters
for more information.
- filter_level : Optional[str]
+ filter_level : str | None
Setting this parameter to one of none, low, or medium will set the
minimum value of the filter_level Tweet attribute required to be
included in the stream. The default value is none, which includes
When displaying a stream of Tweets to end users (dashboards or live
feeds at a presentation or conference, for example) it is suggested
that you set this value to medium.
- languages : Optional[list[str]]
+ languages : list[str] | None
Setting this parameter to a comma-separated list of `BCP 47`_
language identifiers corresponding to any of the languages listed
on Twitter’s `advanced search`_ page will only return Tweets that
have been detected as being written in the specified languages. For
example, connecting with language=en will only stream Tweets
detected to be in the English language.
- stall_warnings: Optional[bool]
+ stall_warnings: bool | None
Specifies whether stall warnings should be delivered. See
https://developer.twitter.com/en/docs/tweets/filter-realtime/guides/basic-stream-parameters
for more information.
Parameters
----------
- languages : Optional[list[str]]
+ languages : list[str] | None
Setting this parameter to a comma-separated list of `BCP 47`_
language identifiers corresponding to any of the languages listed
on Twitter’s `advanced search`_ page will only return Tweets that
have been detected as being written in the specified languages. For
example, connecting with language=en will only stream Tweets
detected to be in the English language.
- stall_warnings: Optional[bool]
+ stall_warnings: bool | None
Specifies whether stall warnings should be delivered. See
https://developer.twitter.com/en/docs/tweets/filter-realtime/guides/basic-stream-parameters
for more information.
Parameters
----------
- bearer_token : Optional[str]
+ bearer_token : str | None
Twitter API Bearer Token
- consumer_key : Optional[str]
+ consumer_key : str | None
Twitter API Consumer Key
- consumer_secret : Optional[str]
+ consumer_secret : str | None
Twitter API Consumer Secret
- access_token : Optional[str]
+ access_token : str | None
Twitter API Access Token
- access_token_secret : Optional[str]
+ access_token_secret : str | None
Twitter API Access Token Secret
return_type : Type[dict | requests.Response | Response]
Type to return from requests to the API
Parameters
----------
- direct_message_deep_link : Optional[str]
+ direct_message_deep_link : str | None
`Tweets a link directly to a Direct Message conversation`_ with an
account.
- for_super_followers_only : Optional[bool]
+ for_super_followers_only : bool | None
Allows you to Tweet exclusively for `Super Followers`_.
- place_id : Optional[str]
+ place_id : str | None
Place ID being attached to the Tweet for geo location.
- media_ids : Optional[list[int | str]]
+ media_ids : list[int | str] | None
A list of Media IDs being attached to the Tweet. This is only
required if the request includes the ``tagged_user_ids``.
- media_tagged_user_ids : Optional[list[int | str]]
+ media_tagged_user_ids : list[int | str] | None
A list of User IDs being tagged in the Tweet with Media. If the
user you're tagging doesn't have photo-tagging enabled, their names
won't show up in the list of tagged users even though the Tweet is
successfully created.
- poll_duration_minutes : Optional[int]
+ poll_duration_minutes : int | None
Duration of the poll in minutes for a Tweet with a poll. This is
only required if the request includes ``poll.options``.
- poll_options : Optional[list[str]]
+ poll_options : list[str] | None
A list of poll options for a Tweet with a poll.
- quote_tweet_id : Optional[int | str]
+ quote_tweet_id : int | str | None
Link to the Tweet being quoted.
- exclude_reply_user_ids : Optional[list[int | str]]
+ exclude_reply_user_ids : list[int | str] | None
A list of User IDs to be excluded from the reply Tweet thus
removing a user from a thread.
- in_reply_to_tweet_id : Optional[int | str]
+ in_reply_to_tweet_id : int | str | None
Tweet ID of the Tweet being replied to. Please note that
``in_reply_to_tweet_id`` needs to be in the request if
``exclude_reply_user_ids`` is present.
- reply_settings : Optional[str]
+ reply_settings : str | None
`Settings`_ to indicate who can reply to the Tweet. Limited to
"mentionedUsers" and "following". If the field isn’t specified, it
will default to everyone.
- text : Optional[str]
+ text : str | None
Text of the Tweet being created. This field is required if
``media.media_ids`` is not present.
user_auth : bool
stream
max_retries : int
Max number of times to retry connecting the stream
- proxy : Optional[str]
+ proxy : str | None
URL of the proxy to use when connecting to the stream
verify : bool | str
Either a boolean, in which case it controls whether to verify the
Whether there's currently a stream running
session : :class:`requests.Session`
Requests Session used to connect to the stream
- thread : Optional[:class:`threading.Thread`]
+ thread : :class:`threading.Thread` | None
Thread used to run the stream
user_agent : str
User agent used when connecting to the stream
Parameters
----------
- follow : Optional[list[int | str]]
+ follow : list[int | str] | None
User IDs, indicating the users to return statuses for in the stream
- track : Optional[list[str]]
+ track : list[str] | None
Keywords to track
- locations : Optional[list[float]]
+ locations : list[float] | None
Specifies a set of bounding boxes to track
- filter_level : Optional[str]
+ filter_level : str | None
Setting this parameter to one of none, low, or medium will set the
minimum value of the filter_level Tweet attribute required to be
included in the stream. The default value is none, which includes
When displaying a stream of Tweets to end users (dashboards or live
feeds at a presentation or conference, for example) it is suggested
that you set this value to medium.
- languages : Optional[list[str]]
+ languages : list[str] | None
Setting this parameter to a comma-separated list of `BCP 47`_
language identifiers corresponding to any of the languages listed
on Twitter’s `advanced search`_ page will only return Tweets that
Returns
-------
- Optional[threading.Thread]
+ threading.Thread | None
The thread if ``threaded`` is set to ``True``, else ``None``
References
Parameters
----------
- languages : Optional[list[str]]
+ languages : list[str] | None
Setting this parameter to a comma-separated list of `BCP 47`_
language identifiers corresponding to any of the languages listed
on Twitter’s `advanced search`_ page will only return Tweets that
Returns
-------
- Optional[threading.Thread]
+ threading.Thread | None
The thread if ``threaded`` is set to ``True``, else ``None``
References
stream
max_retries : int
Max number of times to retry connecting the stream
- proxy : Optional[str]
+ proxy : str | None
URL of the proxy to use when connecting to the stream
verify : bool | str
Either a boolean, in which case it controls whether to verify the
Whether there's currently a stream running
session : :class:`requests.Session`
Requests Session used to connect to the stream
- thread : Optional[:class:`threading.Thread`]
+ thread : :class:`threading.Thread` | None
Thread used to run the stream
user_agent : str
User agent used when connecting to the stream
Parameters
----------
- backfill_minutes : Optional[int]
+ backfill_minutes : int | None
By passing this parameter, you can request up to five (5) minutes
worth of streaming data that you might have missed during a
disconnection to be delivered to you upon reconnection. The
Returns
-------
- Optional[threading.Thread]
+ threading.Thread | None
The thread if ``threaded`` is set to ``True``, else ``None``
References
Parameters
----------
- backfill_minutes : Optional[int]
+ backfill_minutes : int | None
By passing this parameter, you can request up to five (5) minutes
worth of streaming data that you might have missed during a
disconnection to be delivered to you upon reconnection. The
Returns
-------
- Optional[threading.Thread]
+ threading.Thread | None
The thread if ``threaded`` is set to ``True``, else ``None``
References
Parameters
----------
- value : Optional[str]
+ value : str | None
The rule text. If you are using a `Standard Project`_ at the Basic
`access level`_, you can use the basic set of `operators`_, can submit
up to 25 concurrent rules, and can submit rules up to 512 characters
access level, you can use all available operators, can submit up to
1,000 concurrent rules, and can submit rules up to 1,024 characters
long.
- tag : Optional[str]
+ tag : str | None
The tag label. This is a free-form text you can use to identify the
rules that matched a specific Tweet in the streaming response. Tags can
be the same across rules.
- id : Optional[str]
+ id : str | None
Unique identifier of this rule. This is returned as a string.